aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/fmtowns_pc98/towns_audio.h
diff options
context:
space:
mode:
authorathrxx2011-05-20 16:06:14 +0200
committerathrxx2011-05-20 20:28:15 +0200
commit2d1fa6c3f8bdc635d49978ad48f72619707d6893 (patch)
treec2d0e1a6fde7dd9fa4f13389887747dea2cf45aa /audio/softsynth/fmtowns_pc98/towns_audio.h
parentffc2a93daa8d0dd4fed97427ae7f00e4194b26c4 (diff)
downloadscummvm-rg350-2d1fa6c3f8bdc635d49978ad48f72619707d6893.tar.gz
scummvm-rg350-2d1fa6c3f8bdc635d49978ad48f72619707d6893.tar.bz2
scummvm-rg350-2d1fa6c3f8bdc635d49978ad48f72619707d6893.zip
FM-TOWNS AUDIO: fix thread lockups and cleanup
- fixed lockup situation in imuse destructor (only concerning the fm-towns driver) - fixed lockup situation when AudioCDManager functions get called (in both cases both the main thread and the mixer thread would get locked in different mutex belonging to the other thread)
Diffstat (limited to 'audio/softsynth/fmtowns_pc98/towns_audio.h')
-rw-r--r--audio/softsynth/fmtowns_pc98/towns_audio.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/audio/softsynth/fmtowns_pc98/towns_audio.h b/audio/softsynth/fmtowns_pc98/towns_audio.h
index 2c58d46d06..b00243f610 100644
--- a/audio/softsynth/fmtowns_pc98/towns_audio.h
+++ b/audio/softsynth/fmtowns_pc98/towns_audio.h
@@ -25,7 +25,7 @@
#include "audio/mixer.h"
-class TownsAudioInterfaceIntern;
+class TownsAudioInterfaceInternal;
class TownsAudioInterfacePluginDriver {
public:
@@ -48,8 +48,15 @@ public:
// The first 6 bits are the 6 fm channels. The next 8 bits are pcm channels.
void setSoundEffectChanMask(int mask);
+ // These methods should not be needed in standard situations, since the mutex
+ // is handled internally. However, they may be required to avoid lockup situations
+ // if the code using this class has a mutex of its own (example for a lockup
+ // situation: imuse.cpp, line 78).
+ void lockInternal();
+ void unlockInternal();
+
private:
- TownsAudioInterfaceIntern *_intf;
+ TownsAudioInterfaceInternal *_intf;
};
#endif