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:
SarahW 2016-05-22 16:04:19 +01:00
commit d2b6ea7fa3
15 changed files with 60 additions and 37 deletions

View file

@ -22,7 +22,7 @@ static void ssi2001_update(ssi2001_t *ssi2001)
ssi2001->pos = sound_pos_global;
}
static void ssi2001_get_buffer(int16_t *buffer, int len, void *p)
static void ssi2001_get_buffer(int32_t *buffer, int len, void *p)
{
ssi2001_t *ssi2001 = (ssi2001_t *)p;
int c;