aboutsummaryrefslogtreecommitdiff
path: root/audio/fmopl.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2015-04-21 00:43:43 -0400
committerMatthew Hoops2015-07-07 20:19:44 -0400
commit5b06eef1597ce701a4f6d16854be077b952d29f7 (patch)
treeeb12ff6939c312b1b56c8506aa0cb3e39fa2e1ca /audio/fmopl.cpp
parentcc6e304af1b7021c7ee471f55c0674dac1bfb253 (diff)
downloadscummvm-rg350-5b06eef1597ce701a4f6d16854be077b952d29f7.tar.gz
scummvm-rg350-5b06eef1597ce701a4f6d16854be077b952d29f7.tar.bz2
scummvm-rg350-5b06eef1597ce701a4f6d16854be077b952d29f7.zip
AUDIO: Allow for changing the OPL timer rate
Diffstat (limited to 'audio/fmopl.cpp')
-rw-r--r--audio/fmopl.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/audio/fmopl.cpp b/audio/fmopl.cpp
index c9cb1040d6..07c5b44427 100644
--- a/audio/fmopl.cpp
+++ b/audio/fmopl.cpp
@@ -183,6 +183,14 @@ void OPL::stop() {
_callback.reset();
}
+void OPL::setCallbackFrequency(int timerFrequency) {
+ if (!isRunning())
+ return;
+
+ stopCallbacks();
+ startCallbacks(timerFrequency);
+}
+
bool OPL::_hasInstance = false;
EmulatedOPL::EmulatedOPL() :
@@ -249,4 +257,10 @@ void EmulatedOPL::stopCallbacks() {
//g_system->getMixer()->stopHandle(*_handle);
}
+bool EmulatedOPL::isRunning() const {
+ // TODO
+ //return g_system->getMixer()->isSoundHandleActive(*_handle);
+ return true;
+}
+
} // End of namespace OPL