[Scummvm-cvs-logs] SF.net SVN: scummvm:[48183] scummvm/trunk/sound
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Mar 8 01:54:06 CET 2010
Revision: 48183
http://scummvm.svn.sourceforge.net/scummvm/?rev=48183&view=rev
Author: lordhoto
Date: 2010-03-08 00:54:05 +0000 (Mon, 08 Mar 2010)
Log Message:
-----------
Show an error message in case multiple OPL outputs are created instead of using an assert.
The new DBOPL emulator we are using should support multiple instances though. We *might*
consider allowing as many instances as the user wants. Of course since the original
games only had one OPL chip available, that should not be required. Also just in case
we might allow real hardware as playback device that would be out of the question again
too.
Modified Paths:
--------------
scummvm/trunk/sound/fmopl.cpp
scummvm/trunk/sound/fmopl.h
Modified: scummvm/trunk/sound/fmopl.cpp
===================================================================
--- scummvm/trunk/sound/fmopl.cpp 2010-03-08 00:34:53 UTC (rev 48182)
+++ scummvm/trunk/sound/fmopl.cpp 2010-03-08 00:54:05 UTC (rev 48183)
@@ -39,6 +39,12 @@
kDOSBox = 2
};
+OPL::OPL() {
+ if (_hasInstance)
+ error("There are multiple OPL output instances running.");
+ _hasInstance = true;
+}
+
const Config::EmulatorDescription Config::_drivers[] = {
{ "auto", "<default>", kAuto, kFlagOpl2 | kFlagDualOpl2 | kFlagOpl3 },
{ "mame", "MAME OPL emulator", kMame, kFlagOpl2 },
Modified: scummvm/trunk/sound/fmopl.h
===================================================================
--- scummvm/trunk/sound/fmopl.h 2010-03-08 00:34:53 UTC (rev 48182)
+++ scummvm/trunk/sound/fmopl.h 2010-03-08 00:54:05 UTC (rev 48183)
@@ -93,10 +93,9 @@
class OPL {
private:
- // TODO: This is part of a temporary HACK to allow only 1 instance
static bool _hasInstance;
public:
- OPL() { assert(!_hasInstance); _hasInstance = true; }
+ OPL();
virtual ~OPL() { _hasInstance = false; }
/**
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