diff options
author | Nipun Garg | 2019-07-30 10:39:18 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:30 +0200 |
commit | 13d7a0c9347aa437a5365399dd5450c723fc75ff (patch) | |
tree | f8cb45117120c778aa945409a4c838be0b394705 /engines/hdb | |
parent | bcb0171891c967a5d0e282c9c9495b023e393901 (diff) | |
download | scummvm-rg350-13d7a0c9347aa437a5365399dd5450c723fc75ff.tar.gz scummvm-rg350-13d7a0c9347aa437a5365399dd5450c723fc75ff.tar.bz2 scummvm-rg350-13d7a0c9347aa437a5365399dd5450c723fc75ff.zip |
HDB: Set DisposeAfterUse::NO in playStream()
Diffstat (limited to 'engines/hdb')
-rw-r--r-- | engines/hdb/sound.cpp | 72 |
1 files changed, 66 insertions, 6 deletions
diff --git a/engines/hdb/sound.cpp b/engines/hdb/sound.cpp index 9f82544abc..2602a07687 100644 --- a/engines/hdb/sound.cpp +++ b/engines/hdb/sound.cpp @@ -1518,7 +1518,17 @@ bool Sound::playSound(int index) { g_hdb->_mixer->setChannelVolume(_handles[soundChannel], _sfxVolume); - g_hdb->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_handles[soundChannel], _soundCache[index].audioStream); + g_hdb->_mixer->playStream( + Audio::Mixer::kSFXSoundType, + &_handles[soundChannel], + _soundCache[index].audioStream, + -1, + Audio::Mixer::kMaxChannelVolume, + 0, + DisposeAfterUse::NO, + false, + false + ); return true; } @@ -1555,9 +1565,29 @@ bool Sound::playSoundEx(int index, int channel, bool loop) { if (loop) { Audio::AudioStream *loopingStream = new Audio::LoopingAudioStream(_soundCache[index].audioStream, 0, DisposeAfterUse::YES); - g_hdb->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_handles[channel], loopingStream); + g_hdb->_mixer->playStream( + Audio::Mixer::kSFXSoundType, + &_handles[channel], + loopingStream, + -1, + Audio::Mixer::kMaxChannelVolume, + 0, + DisposeAfterUse::NO, + false, + false + ); } else { - g_hdb->_mixer->playStream(Audio::Mixer::kSFXSoundType, &_handles[channel], _soundCache[index].audioStream); + g_hdb->_mixer->playStream( + Audio::Mixer::kSFXSoundType, + &_handles[channel], + _soundCache[index].audioStream, + -1, + Audio::Mixer::kMaxChannelVolume, + 0, + DisposeAfterUse::NO, + false, + false + ); } return true; } @@ -1587,7 +1617,17 @@ bool Sound::playVoice(int index, int actor) { g_hdb->_mixer->setChannelVolume(*_voices[actor].handle, _sfxVolume); - g_hdb->_mixer->playStream(Audio::Mixer::kSpeechSoundType, _voices[actor].handle, audioStream); + g_hdb->_mixer->playStream( + Audio::Mixer::kSpeechSoundType, + _voices[actor].handle, + audioStream, + -1, + Audio::Mixer::kMaxChannelVolume, + 0, + DisposeAfterUse::NO, + false, + false + ); _voices[actor].active = true; _voicePlayed[index - FIRST_VOICE] = 1; @@ -1682,7 +1722,17 @@ bool Sound::beginMusic(SoundType song, bool fadeIn, int ramp) { g_hdb->_mixer->setChannelVolume(*_song1.handle, 0); } - g_hdb->_mixer->playStream(Audio::Mixer::kMusicSoundType, _song1.handle, loopingStream); + g_hdb->_mixer->playStream( + Audio::Mixer::kMusicSoundType, + _song1.handle, + loopingStream, + -1, + Audio::Mixer::kMaxChannelVolume, + 0, + DisposeAfterUse::NO, + false, + false + ); _song1.playing = true; #endif } else if (!_song2.playing) { @@ -1712,7 +1762,17 @@ bool Sound::beginMusic(SoundType song, bool fadeIn, int ramp) { g_hdb->_mixer->setChannelVolume(*_song2.handle, 0); } - g_hdb->_mixer->playStream(Audio::Mixer::kMusicSoundType, _song2.handle, loopingStream); + g_hdb->_mixer->playStream( + Audio::Mixer::kMusicSoundType, + _song2.handle, + loopingStream, + -1, + Audio::Mixer::kMaxChannelVolume, + 0, + DisposeAfterUse::NO, + false, + false + ); _song2.playing = true; #endif } else |