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
|
|
@ -57,7 +57,7 @@ void wss_write(uint16_t addr, uint8_t val, void *p)
|
|||
ad1848_setirq(&wss->ad1848, wss_irq[(val >> 3) & 7]);
|
||||
}
|
||||
|
||||
static void wss_get_buffer(int16_t *buffer, int len, void *p)
|
||||
static void wss_get_buffer(int32_t *buffer, int len, void *p)
|
||||
{
|
||||
wss_t *wss = (wss_t *)p;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue