From 8b169648c841bc7ba54bdde9a19bcea3e4bfafd0 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 17 Jul 2020 01:21:57 +0200 Subject: [PATCH] Removed the now-unused filtbuf[] array from the OPL struct. --- src/include/86box/snd_opl.h | 3 +-- src/sound/snd_opl.c | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/include/86box/snd_opl.h b/src/include/86box/snd_opl.h index aff429e77..68fd93f1d 100644 --- a/src/include/86box/snd_opl.h +++ b/src/include/86box/snd_opl.h @@ -5,8 +5,7 @@ typedef struct opl_t { int pos, chip_nr[2]; - int32_t filtbuf[2], - buffer[SOUNDBUFLEN * 2], + int32_t buffer[SOUNDBUFLEN * 2], buffer2[SOUNDBUFLEN * 2]; pc_timer_t timers[2][2]; diff --git a/src/sound/snd_opl.c b/src/sound/snd_opl.c index ce36078f6..9d64fc906 100644 --- a/src/sound/snd_opl.c +++ b/src/sound/snd_opl.c @@ -115,8 +115,8 @@ opl2_update2(opl_t *opl) opl2_update(1, &opl->buffer2[opl->pos << 1], sound_pos_global - opl->pos); for (; opl->pos < sound_pos_global; opl->pos++) { opl->buffer[(opl->pos << 1) + 1] = opl->buffer2[(opl->pos << 1) + 1]; - opl->filtbuf[0] = opl->buffer[opl->pos << 1] = (opl->buffer[opl->pos << 1] / 2); - opl->filtbuf[1] = opl->buffer[(opl->pos << 1) + 1] = (opl->buffer[(opl->pos << 1) + 1] / 2); + opl->buffer[opl->pos << 1] = (opl->buffer[opl->pos << 1] / 2); + opl->buffer[(opl->pos << 1) + 1] = (opl->buffer[(opl->pos << 1) + 1] / 2); } } } @@ -128,8 +128,8 @@ opl3_update2(opl_t *opl) if (opl->pos < sound_pos_global) { opl3_update(0, &opl->buffer[(opl->pos << 1)], sound_pos_global - opl->pos); for (; opl->pos < sound_pos_global; opl->pos++) { - opl->filtbuf[0] = opl->buffer[opl->pos << 1] = (opl->buffer[opl->pos << 1] / 2); - opl->filtbuf[1] = opl->buffer[(opl->pos << 1) + 1] = (opl->buffer[(opl->pos << 1) + 1] / 2); + opl->buffer[opl->pos << 1] = (opl->buffer[opl->pos << 1] / 2); + opl->buffer[(opl->pos << 1) + 1] = (opl->buffer[(opl->pos << 1) + 1] / 2); } } }