mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-04 18:05:06 +01:00
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:
parent
28d112c03d
commit
7d04780880
@ -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++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user