aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/fmopl.cpp4
-rw-r--r--sound/fmopl.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp
index e086038f4f..4834e586c3 100644
--- a/sound/fmopl.cpp
+++ b/sound/fmopl.cpp
@@ -978,7 +978,7 @@ static void OPL_UnLockTable(void) {
/*******************************************************************************/
/* ---------- update one of chip ----------- */
-void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length) {
+void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length, int interleave) {
int i;
int data;
int16 *buf = buffer;
@@ -1020,7 +1020,7 @@ void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length) {
/* limit check */
data = CLIP(outd[0], OPL_MINOUT, OPL_MAXOUT);
/* store to sound buffer */
- buf[i] = data >> OPL_OUTSB;
+ buf[i << interleave] = data >> OPL_OUTSB;
}
OPL->amsCnt = amsCnt;
diff --git a/sound/fmopl.h b/sound/fmopl.h
index 890a2d1a56..47f21c9956 100644
--- a/sound/fmopl.h
+++ b/sound/fmopl.h
@@ -165,7 +165,7 @@ int OPLWrite(FM_OPL *OPL, int a, int v);
unsigned char OPLRead(FM_OPL *OPL, int a);
int OPLTimerOver(FM_OPL *OPL, int c);
void OPLWriteReg(FM_OPL *OPL, int r, int v);
-void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length);
+void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length, int interleave = 0);
// Factory method
FM_OPL *makeAdlibOPL(int rate);