diff options
Diffstat (limited to 'engines/access/sound.h')
-rw-r--r-- | engines/access/sound.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/access/sound.h b/engines/access/sound.h index e11a6b9730..b372e566d2 100644 --- a/engines/access/sound.h +++ b/engines/access/sound.h @@ -45,15 +45,24 @@ struct SoundEntry { }; class SoundManager { + struct QueuedSound { + Audio::AudioStream *_stream; + int _soundId; + + QueuedSound() : _stream(nullptr), _soundId(-1) {} + QueuedSound(Audio::AudioStream *stream, int soundId) : _stream(stream), _soundId(soundId) {} + }; private: AccessEngine *_vm; Audio::Mixer *_mixer; Audio::SoundHandle _effectsHandle; - Common::Array<Audio::AudioStream *> _queue; + Common::Array<QueuedSound> _queue; void clearSounds(); - void playSound(Resource *res, int priority, bool loop); + void playSound(Resource *res, int priority, bool loop, int soundIndex = -1); + + bool isSoundQueued(int soundId) const; public: Common::Array<SoundEntry> _soundTable; bool _playingSound; |