Public Member Functions | |
bool | endOfStream () const override |
![]() | |
PCSpeaker (int rate=44100) | |
void | play (WaveForm wave, int freq, int32 length) |
void | playQueue (WaveForm wave, float freq, uint32 lengthus) |
void | stop (int32 delay=0) |
void | setVolume (byte volume) |
bool | isPlaying () const |
int | readBuffer (int16 *buffer, const int numSamples) |
bool | isStereo () const |
bool | endOfData () const |
int | getRate () const |
Additional Inherited Members | |
![]() | |
enum | WaveForm { kWaveFormSquare = 0, kWaveFormSine, kWaveFormSaw, kWaveFormTriangle, kWaveFormSilence } |
![]() | |
typedef int8(* | generatorFunc) (uint32, uint32) |
![]() | |
static int8 | generateSquare (uint32 x, uint32 oscLength) |
static int8 | generateSine (uint32 x, uint32 oscLength) |
static int8 | generateSaw (uint32 x, uint32 oscLength) |
static int8 | generateTriangle (uint32 x, uint32 oscLength) |
static int8 | generateSilence (uint32 x, uint32 oscLength) |
![]() | |
Common::Mutex | _mutex |
int | _rate |
WaveForm | _wave |
bool | _playForever |
uint32 | _oscLength |
uint32 | _oscSamples |
uint32 | _remainingSamples |
uint32 | _mixedSamples |
byte | _volume |
Common::Queue< Command > * | _commandQueue |
bool | _commandActive |
![]() | |
static const generatorFunc | generateWave [] |
|
inlineoverridevirtual |
Check whether end of stream has been reached.
If this returns true, it indicates that all data in this stream is used up and no additional data will appear in it in the future.
This is used by the mixer to decide whether a given stream shall be removed from the list of active streams (and thus be destroyed). By default, this maps to endOfData().
Reimplemented from Audio::PCSpeaker.