aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2009-02-15 10:07:50 +0000
committerEugene Sandulenko2009-02-15 10:07:50 +0000
commit0a532dfc306ea367c8ccf6875455b9f766f31e78 (patch)
treeab4bf19777c10f2b2710fa3fa163fb4c98622110
parent25aaf973006f1b7d5d7d373bb12007b2e5b7c11e (diff)
downloadscummvm-rg350-0a532dfc306ea367c8ccf6875455b9f766f31e78.tar.gz
scummvm-rg350-0a532dfc306ea367c8ccf6875455b9f766f31e78.tar.bz2
scummvm-rg350-0a532dfc306ea367c8ccf6875455b9f766f31e78.zip
Add interleave parameter to FMOPL as needed by SCI engine
svn-id: r38211
-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);