Wave sound effect.
#include <srl_sound.hpp>
Public Member Functions | |
| WaveSound (const char *waveFile) | |
| Initializes a new wave sound. | |
| ~WaveSound () | |
| Destroy loaded sound. | |
| int8_t | Play (uint8_t volume=127, int8_t pan=0) |
| Try to play sound on the first free channel. | |
| bool | PlayOnChannel (uint8_t channel, uint8_t volume=127, int8_t pan=0) |
| Try to play a sound on a specific channel. | |
Protected Attributes | |
| int8_t * | data = nullptr |
| Sound data. | |
| uint32_t | dataSize = 0 |
| Number of bytes to play. | |
| uint8_t | depth = _PCM8Bit |
| Bit depth (_PCM8Bit or _PCM16Bit) | |
| uint8_t | mode = _Mono |
| Sound mode (_Mono or _Stereo) | |
| uint16_t | sampleRate = 11020 |
| Sound sample rate. | |