Compliant with review.

This commit is contained in:
Starlet 2018-06-15 08:43:23 -04:00
parent 4cf6524a87
commit 199ceeb01a

View file

@ -41,6 +41,9 @@ namespace Ryujinx.Audio.ADPCM
for (int SampleIndex = 0; SampleIndex < SamplesToRead; SampleIndex++) for (int SampleIndex = 0; SampleIndex < SamplesToRead; SampleIndex++)
{ {
int ADPCMSample = SampleIndex % 2 == 0 ? Helper.GetHighNibble(ADPCM[InIndex]) : Helper.GetLowNibble(ADPCM[InIndex++]); int ADPCMSample = SampleIndex % 2 == 0 ? Helper.GetHighNibble(ADPCM[InIndex]) : Helper.GetLowNibble(ADPCM[InIndex++]);
ADPCMSample <<= 28;
ADPCMSample >>= 28;
int Distance = Scale * ADPCMSample; int Distance = Scale * ADPCMSample;
int PredictedSample = Coef1 * Hist1 + Coef2 * Hist2; int PredictedSample = Coef1 * Hist1 + Coef2 * Hist2;
int CorrectedSample = PredictedSample + Distance; int CorrectedSample = PredictedSample + Distance;