disabled interrupt during YM2612 table initialization to prevent pow() function returning wrong values: fixes random sound issues on game startup

This commit is contained in:
ekeeke31 2010-09-16 11:36:09 +00:00
parent 28d112c03d
commit 7d04780880

View File

@ -1827,10 +1827,14 @@ static void init_tables(void)
signed int n;
double o,m;
#ifdef NGC
u32 level = IRQ_Disable();
#endif
/* build Linear Power Table */
for (x=0; x<TL_RES_LEN; x++)
{
m = (1<<16) / pow(2, (x+1) * (ENV_STEP/4.0) / 8.0);
m = (1<<16) / pow(2,(x+1) * (ENV_STEP/4.0) / 8.0);
m = floor(m);
/* we never reach (1<<16) here due to the (x+1) */
@ -1861,6 +1865,10 @@ static void init_tables(void)
}
}
#ifdef NGC
IRQ_Restore(level);
#endif
/* build Logarithmic Sinus table */
for (i=0; i<SIN_LEN; i++)
{