[Scummvm-git-logs] scummvm master -> 2032ca8ca1bf932ffbd4d6c1b2337caa4d585787
dreammaster
dreammaster at scummvm.org
Sun Jul 16 03:05:20 CEST 2017
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2032ca8ca1 TITANIC: Fix range for timed volume transitions
Commit: 2032ca8ca1bf932ffbd4d6c1b2337caa4d585787
https://github.com/scummvm/scummvm/commit/2032ca8ca1bf932ffbd4d6c1b2337caa4d585787
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-07-15T21:05:15-04:00
Commit Message:
TITANIC: Fix range for timed volume transitions
Changed paths:
engines/titanic/sound/qmixer.cpp
diff --git a/engines/titanic/sound/qmixer.cpp b/engines/titanic/sound/qmixer.cpp
index 9ff6834..b33601d 100644
--- a/engines/titanic/sound/qmixer.cpp
+++ b/engines/titanic/sound/qmixer.cpp
@@ -22,6 +22,7 @@
#include "common/system.h"
#include "titanic/sound/qmixer.h"
+#include "titanic/titanic.h"
namespace Titanic {
@@ -88,10 +89,12 @@ void QMixer::qsWaveMixSetVolume(int iChannel, uint flags, uint volume) {
assert(volume <= 32767);
byte newVolume = (volume >= 32700) ? 255 : volume * 255 / 32767;
- channel._volumeStart = newVolume;
- channel._volumeEnd = volume * 255 / 100; // Convert from 0-100 (percent) to 0-255
+ channel._volumeStart = channel._volume;
+ channel._volumeEnd = newVolume;
channel._volumeChangeStart = g_system->getMillis();
channel._volumeChangeEnd = channel._volumeChangeStart + channel._panRate;
+ debugC(DEBUG_DETAILED, kDebugCore, "qsWaveMixSetPanRate vol=%d to %d, start=%u, end=%u",
+ channel._volumeStart, channel._volumeEnd, channel._volumeChangeStart, channel._volumeChangeEnd);
}
void QMixer::qsWaveMixSetSourcePosition(int iChannel, uint flags, const QSVECTOR &position) {
@@ -190,6 +193,9 @@ void QMixer::qsWaveMixPump() {
(int)(currentTicks - channel._volumeChangeStart) / (int)channel._panRate;
}
+ debugC(DEBUG_DETAILED, kDebugCore, "qsWaveMixPump time=%u vol=%d",
+ currentTicks, channel._volume);
+
if (channel._volume != oldVolume && !channel._sounds.empty()
&& channel._sounds.front()._started) {
_mixer->setChannelVolume(channel._sounds.front()._soundHandle,
More information about the Scummvm-git-logs
mailing list