aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-18 08:15:28 -0700
committerEugene Sandulenko2013-07-18 08:15:28 -0700
commit2c812ade01714351aeda3dbbe877d376ad3d48ca (patch)
tree61daae8cca200b51fdea0c82ecc2d555e97ba865 /audio
parent2eb26ad02ead5fc65cc206cb287ff04c84eba4e8 (diff)
parent4a7e4e5b22da3587a9d68978d7be31e4e78a8ccc (diff)
downloadscummvm-rg350-2c812ade01714351aeda3dbbe877d376ad3d48ca.tar.gz
scummvm-rg350-2c812ade01714351aeda3dbbe877d376ad3d48ca.tar.bz2
scummvm-rg350-2c812ade01714351aeda3dbbe877d376ad3d48ca.zip
Merge pull request #353 from clone2727/eventrec_timer_fix
ALL: Don't use EventRecorder at all when not compiled in
Diffstat (limited to 'audio')
-rw-r--r--audio/mixer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/audio/mixer.cpp b/audio/mixer.cpp
index ab3ed9eb2d..9e6e4596e2 100644
--- a/audio/mixer.cpp
+++ b/audio/mixer.cpp
@@ -429,7 +429,11 @@ void MixerImpl::pauseHandle(SoundHandle handle, bool paused) {
bool MixerImpl::isSoundIDActive(int id) {
Common::StackLock lock(_mutex);
+
+#ifdef ENABLE_EVENTRECORDER
g_eventRec.updateSubsystems();
+#endif
+
for (int i = 0; i != NUM_CHANNELS; i++)
if (_channels[i] && _channels[i]->getId() == id)
return true;
@@ -446,7 +450,11 @@ int MixerImpl::getSoundID(SoundHandle handle) {
bool MixerImpl::isSoundHandleActive(SoundHandle handle) {
Common::StackLock lock(_mutex);
+
+#ifdef ENABLE_EVENTRECORDER
g_eventRec.updateSubsystems();
+#endif
+
const int index = handle._val % NUM_CHANNELS;
return _channels[index] && _channels[index]->getHandle()._val == handle._val;
}