[Scummvm-cvs-logs] SF.net SVN: scummvm:[40337] scummvm/trunk/sound

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Wed May 6 00:14:34 CEST 2009


Revision: 40337
          http://scummvm.svn.sourceforge.net/scummvm/?rev=40337&view=rev
Author:   lordhoto
Date:     2009-05-05 22:14:34 +0000 (Tue, 05 May 2009)

Log Message:
-----------
- Remove default parameter from OPL::create
- Add some note that no one should use the legacy API for new code

Modified Paths:
--------------
    scummvm/trunk/sound/fmopl.cpp
    scummvm/trunk/sound/fmopl.h

Modified: scummvm/trunk/sound/fmopl.cpp
===================================================================
--- scummvm/trunk/sound/fmopl.cpp	2009-05-05 22:07:50 UTC (rev 40336)
+++ scummvm/trunk/sound/fmopl.cpp	2009-05-05 22:14:34 UTC (rev 40337)
@@ -74,9 +74,8 @@
 	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)) {

Modified: scummvm/trunk/sound/fmopl.h
===================================================================
--- scummvm/trunk/sound/fmopl.h	2009-05-05 22:07:50 UTC (rev 40336)
+++ scummvm/trunk/sound/fmopl.h	2009-05-05 22:14:34 UTC (rev 40337)
@@ -100,12 +100,13 @@
 	 */
 	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 @@
 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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list