diff options
| author | Johannes Schickel | 2009-05-05 22:14:34 +0000 |
|---|---|---|
| committer | Johannes Schickel | 2009-05-05 22:14:34 +0000 |
| commit | 5cc44292a2d47faa418651169f5a66cf99419e78 (patch) | |
| tree | 60e1b2b07513b3b660ffbf8bd9a4de4d65a2acd7 | |
| parent | bd82af01c2390b4feb93d2e58af9024b1b2f21c4 (diff) | |
| download | scummvm-rg350-5cc44292a2d47faa418651169f5a66cf99419e78.tar.gz scummvm-rg350-5cc44292a2d47faa418651169f5a66cf99419e78.tar.bz2 scummvm-rg350-5cc44292a2d47faa418651169f5a66cf99419e78.zip | |
- Remove default parameter from OPL::create
- Add some note that no one should use the legacy API for new code
svn-id: r40337
| -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 |
