Public Member Functions | |
bool | isPlaying () const |
bool | isDimmed () const |
void | getTunePlaying (void *voidPtr, int length) |
void | restoreThatTune (void *voidPtr) |
void | setMusicSceneDetails (SCNHANDLE hScript, SCNHANDLE hSegment, const char *fileName) |
void | setVolume (int volume) |
void | startPlay (int id) |
void | stopPlay () |
bool | getMusicTinselDimmed () const |
void | dim (bool bTinselDim) |
void | unDim (bool bTinselUnDim) |
void | dimIteration () |
void | startFadeOut (int ticks) |
void | fadeOutIteration () |
int | readBuffer (int16 *buffer, const int numSamples) override |
bool | isStereo () const override |
bool | endOfData () const override |
bool | endOfStream () const override |
int | getRate () const override |
Protected Types | |
enum | State { S_IDLE, S_NEW, S_MID, S_END1, S_END2, S_END3, S_NEXT, S_STOP } |
Protected Attributes | |
Audio::SoundHandle | _handle |
Audio::AudioStream * | _curChunk |
Common::Mutex | _mutex |
bool | _end |
int | _silenceSamples |
State | _state |
State | _mState |
bool | _forcePlay |
int32 | _scriptNum |
int32 | _scriptIndex |
SCNHANDLE | _hScript |
SCNHANDLE | _hSegment |
Common::Path | _filename |
Common::File | _file |
uint8 | _volume |
bool | _dimmed |
bool | _dimmedTinsel |
uint8 | _dimmedVolume |
int | _dimIteration |
int | _dimPosition |
uint8 | _fadeOutVolume |
int | _fadeOutIteration |
|
overridevirtual |
Fill the given buffer with up to numSamples
samples.
Data must be in native endianness, 16 bits per sample, signed. For stereo stream, the buffer will be filled with interleaved left and right channel samples, starting with the left sample. Furthermore, the samples in the left and right are summed up. So if you request 4 samples from a stereo stream, you will get a total of two left channel and two right channel samples.
Implements Audio::AudioStream.
|
overridevirtual |
Check whether this is a stereo stream.
Implements Audio::AudioStream.
|
inlineoverridevirtual |
Check whether end of data has been reached.
If this returns true, it indicates that at this time there is no data available in the stream. However, there might be more data in the future.
This is used by e.g. a rate converter to decide whether to keep on converting data or to stop.
Implements Audio::AudioStream.
|
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::AudioStream.
|
overridevirtual |
Sample rate of the stream.
Implements Audio::AudioStream.