Merge pull request #1097 from LegendOfDragoon/improve-resampler
Improve alist_resample
This commit is contained in:
commit
64e1f0f6f8
|
@ -633,11 +633,11 @@ void alist_resample( CHle * hle, bool init, bool flag2, uint16_t dmemo, uint16_t
|
|||
{
|
||||
const int16_t* lut = RESAMPLE_LUT + ((pitch_accu & 0xfc00) >> 8);
|
||||
|
||||
*sample(hle, opos++) = clamp_s16(
|
||||
((*sample(hle, ipos) * lut[0]) >> 15) +
|
||||
((*sample(hle, ipos + 1) * lut[1]) >> 15) +
|
||||
((*sample(hle, ipos + 2) * lut[2]) >> 15) +
|
||||
((*sample(hle, ipos + 3) * lut[3]) >> 15));
|
||||
*sample(hle, opos++) = clamp_s16( (
|
||||
(*sample(hle, ipos ) * lut[0]) +
|
||||
(*sample(hle, ipos + 1) * lut[1]) +
|
||||
(*sample(hle, ipos + 2) * lut[2]) +
|
||||
(*sample(hle, ipos + 3) * lut[3]) ) >> 15);
|
||||
|
||||
pitch_accu += pitch;
|
||||
ipos += (pitch_accu >> 16);
|
||||
|
|
Loading…
Reference in New Issue