From beb5395d545233171544daf12838e80e667a0a83 Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Tue, 25 Jan 2005 21:36:01 +0000 Subject: fixed volume channel in fade track svn-id: r16638 --- scumm/imuse_digi/dimuse_track.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'scumm/imuse_digi') 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; -- cgit v1.2.3