Skip to content

Commit

Permalink
SurroundOPL: Store current active chip number
Browse files Browse the repository at this point in the history
This means getchip() now returns the correct value.  This fixes
part of the issue in adplug#120 where some notes were missing.
  • Loading branch information
Malvineous committed Oct 20, 2020
1 parent 4f4d53a commit 5ca041a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/surroundopl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ void CSurroundopl::init()
{
this->oplA.opl->init();
this->oplB.opl->init();
this->oplA.opl->setchip(0);
this->oplB.opl->setchip(0);
for (int c = 0; c < 2; c++) {
for (int i = 0; i < 256; i++) {
this->iFMReg[c][i] = 0;
Expand All @@ -243,6 +245,7 @@ void CSurroundopl::setchip(int n)
{
this->oplA.opl->setchip(n);
this->oplB.opl->setchip(n);
this->Copl::setchip(n);
}

void CSurroundopl::set_offset(double offset)
Expand All @@ -251,4 +254,4 @@ void CSurroundopl::set_offset(double offset)
{
this->offset = offset;
}
}
}

0 comments on commit 5ca041a

Please sign in to comment.