aboutsummaryrefslogtreecommitdiff
path: root/scumm/imuse_digi
diff options
context:
space:
mode:
authorPaweł Kołodziejski2005-01-25 21:36:01 +0000
committerPaweł Kołodziejski2005-01-25 21:36:01 +0000
commitbeb5395d545233171544daf12838e80e667a0a83 (patch)
tree61240afc5c2438a72a8ab6cbe7dc8ab6ab67c987 /scumm/imuse_digi
parent6c5f3ee21a98ae911238ab7858c902765f8101c0 (diff)
downloadscummvm-rg350-beb5395d545233171544daf12838e80e667a0a83.tar.gz
scummvm-rg350-beb5395d545233171544daf12838e80e667a0a83.tar.bz2
scummvm-rg350-beb5395d545233171544daf12838e80e667a0a83.zip
fixed volume channel in fade track
svn-id: r16638
Diffstat (limited to 'scumm/imuse_digi')
-rw-r--r--scumm/imuse_digi/dimuse_track.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/scumm/imuse_digi/dimuse_track.cpp b/scumm/imuse_digi/dimuse_track.cpp
index 2d39ec66f4..4aeaaba651 100644
--- a/scumm/imuse_digi/dimuse_track.cpp
+++ b/scumm/imuse_digi/dimuse_track.cpp
@@ -296,10 +296,19 @@ IMuseDigital::Track *IMuseDigital::cloneToFadeOutTrack(Track *track, int fadeDel
fadeTrack->volFadeStep = (fadeTrack->volFadeDest - fadeTrack->vol) * 60 * (1000 / _callbackFps) / (1000 * fadeDelay);
fadeTrack->volFadeUsed = true;
+ SoundMixer::SoundType type = SoundMixer::kPlainAudioDataType;
+
+ if (fadeTrack->volGroupId == 1)
+ type = SoundMixer::kSpeechAudioDataType;
+ if (fadeTrack->volGroupId == 2)
+ type = SoundMixer::kSFXAudioDataType;
+ if (fadeTrack->volGroupId == 3)
+ type = SoundMixer::kMusicAudioDataType;
+
// setup 1 second stream wrapped buffer
int32 streamBufferSize = fadeTrack->iteration;
fadeTrack->stream = makeAppendableAudioStream(_sound->getFreq(fadeTrack->soundHandle), fadeTrack->mixerFlags, streamBufferSize);
- _vm->_mixer->playInputStream(SoundMixer::kSFXAudioDataType, &fadeTrack->handle, fadeTrack->stream, -1, fadeTrack->vol / 1000, fadeTrack->pan, false);
+ _vm->_mixer->playInputStream(type, &fadeTrack->handle, fadeTrack->stream, -1, fadeTrack->vol / 1000, fadeTrack->pan, false);
fadeTrack->started = true;
fadeTrack->used = true;