22 #ifndef MEDIASTATION_AUDIO_H 23 #define MEDIASTATION_AUDIO_H 25 #include "common/array.h" 26 #include "audio/audiostream.h" 27 #include "audio/mixer.h" 29 #include "mediastation/datafile.h" 34 kSoundPlayStateInvalid = 0,
35 kSoundPlayStateStopped = 1,
36 kSoundPlayStatePlaying = 2,
37 kSoundPlayStatePaused = 3,
38 kSoundPlayStateSleep = 4,
39 kSoundPlayStateAwake = 5
42 enum SoundStopReason {
43 kSoundStopForNone = 0,
44 kSoundStopForFailure = 1,
46 kSoundStopForScriptStop = 3,
47 kSoundStopForAbort = 4
53 virtual void soundPlayStateChanged(SoundPlayState state, SoundStopReason why) = 0;
69 void makeSoundIdle(SoundStopReason stopReason = kSoundStopForNone);
70 void playStateChanged(SoundPlayState state, SoundStopReason why = kSoundStopForNone);
72 void readParameters(
Chunk &chunk);
73 void readChunk(
Chunk &chunk);
74 bool isEmpty() {
return _streams.empty(); }
77 uint _channelCount = 0;
78 uint _bitsPerSample = 0;
85 SoundPlayState _state = kSoundPlayStateStopped;