Fix clipping/static in several NeoGeo games (Art of Fighting, Football Frenzy and more) with FM interpolation on

This commit is contained in:
dinkc64 2014-12-02 18:17:23 +00:00
parent a554d539b9
commit 67e518b271
2 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ static void YM2610UpdateResample(INT16* pSoundBuf, INT32 nSegmentEnd)
pYM2610Buffer[5] = pBuffer + 5 * 4096 + 4;
for (INT32 i = (nFractionalPosition >> 16) - 4; i < nSamplesNeeded; i++) {
pYM2610Buffer[5][i] = pYM2610Buffer[2][i] + pYM2610Buffer[3][i] + pYM2610Buffer[4][i];
pYM2610Buffer[5][i] = BURN_SND_CLIP(pYM2610Buffer[2][i] + pYM2610Buffer[3][i] + pYM2610Buffer[4][i]);
}
for (INT32 i = (nFractionalPosition & 0xFFFF0000) >> 15; i < nSegmentLength; i += 2, nFractionalPosition += nSampleSize) {

View File

@ -583,9 +583,9 @@ static void init_tables(void)
/* we never reach zero here due to ((i*2)+1) */
if (m>0.0)
o = 8*log(1.0/m)/log(2); /* convert to 'decibels' */
o = 8*log(1.0/m)/log(2.0); /* convert to 'decibels' */
else
o = 8*log(-1.0/m)/log(2); /* convert to 'decibels' */
o = 8*log(-1.0/m)/log(2.0); /* convert to 'decibels' */
o = o / (ENV_STEP/4);