Mix sound sources in 32-bit buffer, then clip to 16-bit for output. Fixes overflow in some situations, eg MegaRace on SB16.
This commit is contained in:
parent
9a5ac02902
commit
d2b6ea7fa3
15 changed files with 60 additions and 37 deletions
|
|
@ -167,7 +167,7 @@ static void pssj_callback(void *p)
|
|||
pssj->timer_count += (int)(TIMER_USEC * (1000000.0 / 3579545.0) * (double)(pssj->freq ? pssj->freq : 0x400));
|
||||
}
|
||||
|
||||
static void pssj_get_buffer(int16_t *buffer, int len, void *p)
|
||||
static void pssj_get_buffer(int32_t *buffer, int len, void *p)
|
||||
{
|
||||
pssj_t *pssj = (pssj_t *)p;
|
||||
int c;
|
||||
|
|
|
|||
Loading…
Reference in a new issue