diff options
-rw-r--r-- | sound/fmopl.cpp | 3 | ||||
-rw-r--r-- | sound/fmopl.h | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sound/fmopl.cpp b/sound/fmopl.cpp index 7b5d4522ec..8d52b688cb 100644 --- a/sound/fmopl.cpp +++ b/sound/fmopl.cpp @@ -74,9 +74,8 @@ void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length) { OPL->readBuffer(buffer, length); } -// Factory method FM_OPL *makeAdlibOPL(int rate) { - FM_OPL *opl = OPL::OPL::create(); + FM_OPL *opl = OPL::OPL::create(OPL::OPL::kOpl2); if (opl) { if (!opl->init(rate)) { diff --git a/sound/fmopl.h b/sound/fmopl.h index ad0fb9eb6f..7713f76e6a 100644 --- a/sound/fmopl.h +++ b/sound/fmopl.h @@ -100,12 +100,13 @@ public: */ virtual bool isStereo() const = 0; - static OPL *create(kOplType type = kOpl2); + static OPL *create(kOplType type); }; } // end of namespace OPL // Legacy API +// !You should not write any new code using the legacy API! typedef OPL::OPL FM_OPL; void OPLDestroy(FM_OPL *OPL); @@ -116,7 +117,11 @@ unsigned char OPLRead(FM_OPL *OPL, int a); void OPLWriteReg(FM_OPL *OPL, int r, int v); void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length); -// Factory method +/** + * Legacy factory to create an AdLib (OPL2) chip. + * + * !You should not write any new code using the legacy API! + */ FM_OPL *makeAdlibOPL(int rate); #endif |