diff options
author | Paul Gilbert | 2017-08-03 22:24:00 -0400 |
---|---|---|
committer | Paul Gilbert | 2017-08-03 22:24:00 -0400 |
commit | 4649bbfce286b51ffd822dfb50d90e5709fade97 (patch) | |
tree | 5aae4db96efefedbab25c9dbe3664f09ce278d80 /engines/titanic/sound/qmixer.cpp | |
parent | a503af495988a0a65d770758d697475f5b1ac414 (diff) | |
download | scummvm-rg350-4649bbfce286b51ffd822dfb50d90e5709fade97.tar.gz scummvm-rg350-4649bbfce286b51ffd822dfb50d90e5709fade97.tar.bz2 scummvm-rg350-4649bbfce286b51ffd822dfb50d90e5709fade97.zip |
TITANIC: Shifting wave file playback into CWaveFile class
Diffstat (limited to 'engines/titanic/sound/qmixer.cpp')
-rw-r--r-- | engines/titanic/sound/qmixer.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/engines/titanic/sound/qmixer.cpp b/engines/titanic/sound/qmixer.cpp index b33601d82e..5c511c3cae 100644 --- a/engines/titanic/sound/qmixer.cpp +++ b/engines/titanic/sound/qmixer.cpp @@ -209,11 +209,8 @@ void QMixer::qsWaveMixPump() { SoundEntry &sound = channel._sounds.front(); if (sound._started && !_mixer->isSoundHandleActive(sound._soundHandle)) { if (sound._loops == -1 || sound._loops-- > 0) { - // Need to loop the sound again - sound._waveFile->audioStream()->rewind(); - _mixer->playStream(sound._waveFile->_soundType, - &sound._soundHandle, sound._waveFile->audioStream(), - -1, channel.getRawVolume(), 0, DisposeAfterUse::NO); + // Need to loop (replay) the sound again + sound._soundHandle = sound._waveFile->play(channel.getRawVolume()); } else { // Sound is finished if (sound._callback) @@ -234,10 +231,8 @@ void QMixer::qsWaveMixPump() { if (channel._resetDistance) channel._distance = 0.0; - // Calculate an effective volume based on distance of source - _mixer->playStream(sound._waveFile->_soundType, - &sound._soundHandle, sound._waveFile->audioStream(), - -1, channel.getRawVolume(), 0, DisposeAfterUse::NO); + // Play the wave + sound._soundHandle = sound._waveFile->play(channel.getRawVolume()); sound._started = true; } } |