diff options
author | athrxx | 2012-11-10 15:46:02 +0100 |
---|---|---|
committer | athrxx | 2012-11-11 19:14:28 +0100 |
commit | e016e7dfc2b1e3cdb39c01d81c5a34eee66a277b (patch) | |
tree | 841d055b9a2d0c64eae59473ff78ec70800ef65b /engines/kyra/sound.h | |
parent | 8789087be9749f7a13fbfdd72a2c984c0bc9e158 (diff) | |
download | scummvm-rg350-e016e7dfc2b1e3cdb39c01d81c5a34eee66a277b.tar.gz scummvm-rg350-e016e7dfc2b1e3cdb39c01d81c5a34eee66a277b.tar.bz2 scummvm-rg350-e016e7dfc2b1e3cdb39c01d81c5a34eee66a277b.zip |
KYRA: implement LOL sfx priority handling
Diffstat (limited to 'engines/kyra/sound.h')
-rw-r--r-- | engines/kyra/sound.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index 63cec48d00..384aeb4f35 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -184,11 +184,11 @@ public: * @param handle store a copy of the sound handle * @return playtime of the voice file (-1 marks unknown playtime) */ - virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false); + virtual int32 voicePlay(const char *file, Audio::SoundHandle *handle = 0, uint8 volume = 255, uint8 priority = 255, bool isSfx = false); Audio::SeekableAudioStream *getVoiceStream(const char *file) const; - bool playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle = 0, uint8 volume = 255, bool isSfx = false); + bool playVoiceStream(Audio::AudioStream *stream, Audio::SoundHandle *handle = 0, uint8 volume = 255, uint8 priority = 255, bool isSfx = false); /** * Checks if a voice is being played. @@ -238,7 +238,13 @@ protected: kNumChannelHandles = 4 }; - Audio::SoundHandle _soundChannels[kNumChannelHandles]; + struct SoundChannel { + SoundChannel() : handle(), priority(0) {} + Audio::SoundHandle handle; + int priority; + }; + + SoundChannel _soundChannels[kNumChannelHandles]; int _musicEnabled; bool _sfxEnabled; |