From ee983e47f03e039cc8d369c4bceb202440700130 Mon Sep 17 00:00:00 2001 From: cam900 Date: Thu, 15 Dec 2022 20:26:53 +0900 Subject: [PATCH] Fix core --- src/engine/platform/sound/ga20/iremga20.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/engine/platform/sound/ga20/iremga20.cpp b/src/engine/platform/sound/ga20/iremga20.cpp index 31e962c8e..8a3167b13 100644 --- a/src/engine/platform/sound/ga20/iremga20.cpp +++ b/src/engine/platform/sound/ga20/iremga20.cpp @@ -47,7 +47,7 @@ Revisions: #include "iremga20.h" -#include +#include //************************************************************************** @@ -92,10 +92,10 @@ void iremga20_device::sound_stream_update(short** outputs, int len) { for (int i = 0; i < len; i++) { - s32 sampleout = 0; - for (int j = 0; j < 4; j++) { + s32 sampleout = 0; + channel_def &ch = m_channel[j]; if (ch.play) { @@ -104,7 +104,7 @@ void iremga20_device::sound_stream_update(short** outputs, int len) ch.play = false; else { - sampleout += (sample - 0x80) * (s32)ch.volume; + sampleout = (sample - 0x80) * (s32)ch.volume; ch.counter--; if (ch.counter <= ch.rate) {