aboutsummaryrefslogtreecommitdiff
path: root/audio/fmopl.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2015-04-29 23:42:01 -0400
committerMatthew Hoops2015-07-07 20:19:46 -0400
commitdce05c520b2e1f273f395c986573f532ee698921 (patch)
tree034c6f504cd14b9adae43fdf721c3a8426a45c16 /audio/fmopl.cpp
parentb367ea548d7c129e14fec6164ebe5610d3edeb46 (diff)
downloadscummvm-rg350-dce05c520b2e1f273f395c986573f532ee698921.tar.gz
scummvm-rg350-dce05c520b2e1f273f395c986573f532ee698921.tar.bz2
scummvm-rg350-dce05c520b2e1f273f395c986573f532ee698921.zip
AUDIO: Be consistent with calling stop() in OPL destructors
Diffstat (limited to 'audio/fmopl.cpp')
-rw-r--r--audio/fmopl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/audio/fmopl.cpp b/audio/fmopl.cpp
index 07c5b44427..638da6c224 100644
--- a/audio/fmopl.cpp
+++ b/audio/fmopl.cpp
@@ -201,8 +201,10 @@ EmulatedOPL::EmulatedOPL() :
EmulatedOPL::~EmulatedOPL() {
// Stop callbacks, just in case. If it's still playing at this
- // point, there's probably a bigger issue, though.
- stopCallbacks();
+ // point, there's probably a bigger issue, though. The subclass
+ // needs to call stop() or the pointer can still use be used in
+ // the mixer thread at the same time.
+ stop();
}
int EmulatedOPL::readBuffer(int16 *buffer, const int numSamples) {