From f334e6e38ae4bc65d398fa174a8be892cb403063 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 4 Feb 2017 14:34:04 +0100 Subject: MOHAWK: Add sound effect related methods --- engines/mohawk/riven_sound.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engines/mohawk/riven_sound.cpp') diff --git a/engines/mohawk/riven_sound.cpp b/engines/mohawk/riven_sound.cpp index 569bbb478a..354ba2dcce 100644 --- a/engines/mohawk/riven_sound.cpp +++ b/engines/mohawk/riven_sound.cpp @@ -68,6 +68,11 @@ void RivenSoundManager::playSound(uint16 id, uint16 volume, bool playOnDraw) { } } +void RivenSoundManager::playSound(const Common::String &name, uint16 volume, bool playOnDraw) { + uint16 id =_vm->findResourceID(ID_TWAV, name); + playSound(id, volume, playOnDraw); +} + void RivenSoundManager::playSLST(const SLSTRecord &slstRecord) { if (slstRecord.soundIds.empty()) { return; @@ -298,6 +303,10 @@ bool RivenSoundManager::fadeBalance(RivenSoundManager::AmbientSound &ambientSoun } } +bool RivenSoundManager::isEffectPlaying() const { + return _effect != nullptr && _effect->isPlaying(); +} + RivenSound::RivenSound(MohawkEngine *vm, Audio::RewindableAudioStream *rewindStream) : _vm(vm), _volume(Audio::Mixer::kMaxChannelVolume), -- cgit v1.2.3