that should be 0x8000

This commit is contained in:
Nadia Holmquist Pedersen 2024-03-08 16:59:31 +01:00
parent faf3c0f2e0
commit b117bb8f58
1 changed files with 3 additions and 3 deletions

View File

@ -664,7 +664,7 @@ s32 SPUChannel::Run()
out = out + ((InterpSNESGauss[0x1FF - samplepos] * CLAMP(PrevSample[1])) >> 10); out = out + ((InterpSNESGauss[0x1FF - samplepos] * CLAMP(PrevSample[1])) >> 10);
out = out + ((InterpSNESGauss[0x100 + samplepos] * CLAMP(PrevSample[0])) >> 10); out = out + ((InterpSNESGauss[0x100 + samplepos] * CLAMP(PrevSample[0])) >> 10);
out = out + ((InterpSNESGauss[0x000 + samplepos] * CLAMP(val)) >> 10); out = out + ((InterpSNESGauss[0x000 + samplepos] * CLAMP(val)) >> 10);
val = std::clamp(out, -0x7FFF, 0x7FFF); val = std::clamp(out, -0x8000, 0x7FFF);
#undef CLAMP #undef CLAMP
break; break;
} }