diff options
author | Bastien Bouclet | 2017-07-01 13:52:50 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | dd4c0bcbeb65c62fe07ee28388f98834f1786e0c (patch) | |
tree | c37541f89f1aa33bb8680fd3301c618302962999 /engines/mohawk/riven_sound.cpp | |
parent | f29197e32c023a3c7969409b2bec2f94edd4c53a (diff) | |
download | scummvm-rg350-dd4c0bcbeb65c62fe07ee28388f98834f1786e0c.tar.gz scummvm-rg350-dd4c0bcbeb65c62fe07ee28388f98834f1786e0c.tar.bz2 scummvm-rg350-dd4c0bcbeb65c62fe07ee28388f98834f1786e0c.zip |
MOHAWK: Set the proper mixer sound types for Riven
Diffstat (limited to 'engines/mohawk/riven_sound.cpp')
-rw-r--r-- | engines/mohawk/riven_sound.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/mohawk/riven_sound.cpp b/engines/mohawk/riven_sound.cpp index 20ba353863..efbcdfb33c 100644 --- a/engines/mohawk/riven_sound.cpp +++ b/engines/mohawk/riven_sound.cpp @@ -61,7 +61,7 @@ void RivenSoundManager::playSound(uint16 id, uint16 volume, bool playOnDraw) { return; } - _effect = new RivenSound(_vm, rewindStream); + _effect = new RivenSound(_vm, rewindStream, Audio::Mixer::kSFXSoundType); _effect->setVolume(volume); _effectPlayOnDraw = playOnDraw; @@ -138,7 +138,7 @@ void RivenSoundManager::addAmbientSounds(const SLSTRecord &record) { for (uint i = oldSize; i < _ambientSounds.sounds.size(); i++) { Audio::RewindableAudioStream *stream = makeAudioStream(record.soundIds[i]); - RivenSound *sound = new RivenSound(_vm, stream); + RivenSound *sound = new RivenSound(_vm, stream, Audio::Mixer::kMusicSoundType); sound->setVolume(record.volumes[i]); sound->setBalance(record.balances[i]); @@ -310,12 +310,13 @@ bool RivenSoundManager::isEffectPlaying() const { return _effect != nullptr && _effect->isPlaying(); } -RivenSound::RivenSound(MohawkEngine_Riven *vm, Audio::RewindableAudioStream *rewindStream) : +RivenSound::RivenSound(MohawkEngine_Riven *vm, Audio::RewindableAudioStream *rewindStream, Audio::Mixer::SoundType mixerType) : _vm(vm), _volume(Audio::Mixer::kMaxChannelVolume), _balance(0), _looping(false), - _stream(rewindStream) { + _stream(rewindStream), + _mixerType(mixerType) { } @@ -371,7 +372,7 @@ void RivenSound::play() { int8 mixerBalance = convertBalance(_balance); byte mixerVolume = convertVolume(_volume); - _vm->_mixer->playStream(Audio::Mixer::kPlainSoundType, &_handle, playStream, -1, mixerVolume, mixerBalance); + _vm->_mixer->playStream(_mixerType, &_handle, playStream, -1, mixerVolume, mixerBalance); _stream = nullptr; } |