From 2912e7d746ab2aacad60f255f304becc5fe84078 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 8 May 2024 03:23:00 +0200 Subject: [PATCH] E-MU 8000: Remove some useless clipping - the audio already gets clipped before being passed to the output buffer, so this is no longer necessary. --- src/sound/snd_emu8k.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/sound/snd_emu8k.c b/src/sound/snd_emu8k.c index cc01ff6dd..5f13d2f8e 100644 --- a/src/sound/snd_emu8k.c +++ b/src/sound/snd_emu8k.c @@ -2124,21 +2124,6 @@ emu8k_update(emu8k_t *emu8k) emu8k_work_chorus(&emu8k->chorus_in_buffer[emu8k->pos], buf, &emu8k->chorus_engine, wavetable_pos_global - emu8k->pos); emu8k_work_eq(buf, wavetable_pos_global - emu8k->pos); - // Clip signal - for (pos = emu8k->pos; pos < wavetable_pos_global; pos++) { - if (buf[0] < -32768) - buf[0] = -32768; - else if (buf[0] > 32767) - buf[0] = 32767; - - if (buf[1] < -32768) - buf[1] = -32768; - else if (buf[1] > 32767) - buf[1] = 32767; - - buf += 2; - } - /* Update EMU clock. */ emu8k->wc += (wavetable_pos_global - emu8k->pos);