From 32ed6a30d42fe5663750ad496a172547d00a65f9 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 25 Sep 2024 11:11:52 +0200 Subject: [PATCH] Fixed the AdLib Gold regression that were causing noise. --- src/sound/snd_adlibgold.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sound/snd_adlibgold.c b/src/sound/snd_adlibgold.c index 488dcb8a6..8f62d0417 100644 --- a/src/sound/snd_adlibgold.c +++ b/src/sound/snd_adlibgold.c @@ -791,8 +791,8 @@ adgold_get_buffer(int32_t *buffer, int len, void *priv) adgold_update(adgold); for (c = 0; c < len * 2; c += 2) { - adgold_buffer[c] += ((adgold->mma_buffer[0][c >> 1] * adgold->samp_vol_l) >> 7) / 4; - adgold_buffer[c + 1] += ((adgold->mma_buffer[1][c >> 1] * adgold->samp_vol_r) >> 7) / 4; + adgold_buffer[c] = ((adgold->mma_buffer[0][c >> 1] * adgold->samp_vol_l) >> 7) / 4; + adgold_buffer[c + 1] = ((adgold->mma_buffer[1][c >> 1] * adgold->samp_vol_r) >> 7) / 4; } if (adgold->surround_enabled) @@ -904,7 +904,6 @@ adgold_get_music_buffer(int32_t *buffer, int len, void *priv) int c; const int32_t *opl_buf = adgold->opl.update(adgold->opl.priv); - adgold_update(adgold); for (c = 0; c < len * 2; c += 2) { adgold_buffer[c] = ((opl_buf[c] * adgold->fm_vol_l) >> 7) / 2;