Restore Sega Rally 2 music in some practice stages

This commit is contained in:
SpinDizzy 2019-02-07 06:32:46 +00:00
parent 383e6ac85c
commit 6fe878b1d3

View file

@ -1038,23 +1038,30 @@ void CDSB2::RunFrame(INT16 *audioL, INT16 *audioR)
INT16 *leftChannelSource = nullptr; INT16 *leftChannelSource = nullptr;
INT16 *rightChannelSource = nullptr; INT16 *rightChannelSource = nullptr;
UINT8 volL=0, volR=0;
switch (stereo) switch (stereo)
{ {
default: default:
case StereoMode::Stereo: case StereoMode::Stereo:
leftChannelSource = mpegL; leftChannelSource = mpegL;
rightChannelSource = mpegR; rightChannelSource = mpegR;
volL = volume[0];
volR = volume[1];
break; break;
case StereoMode::MonoLeft: case StereoMode::MonoLeft:
leftChannelSource = mpegL; leftChannelSource = mpegL;
rightChannelSource = mpegL; rightChannelSource = mpegL;
volL = volume[1];
volR = volume[1];
break; break;
case StereoMode::MonoRight: case StereoMode::MonoRight:
leftChannelSource = mpegR; leftChannelSource = mpegR;
rightChannelSource = mpegR; rightChannelSource = mpegR;
volL = volume[0];
volR = volume[0];
break; break;
} }
retainedSamples = Resampler.UpSampleAndMix(audioL, audioR, leftChannelSource, rightChannelSource, volume[0], volume[1], 44100/60, 32000/60+2, 44100, 32000); retainedSamples = Resampler.UpSampleAndMix(audioL, audioR, leftChannelSource, rightChannelSource, volL, volR, 44100/60, 32000/60+2, 44100, 32000);
} }
void CDSB2::Reset(void) void CDSB2::Reset(void)