diff options
author | athrxx | 2011-05-20 16:06:14 +0200 |
---|---|---|
committer | athrxx | 2011-05-20 20:28:15 +0200 |
commit | 2d1fa6c3f8bdc635d49978ad48f72619707d6893 (patch) | |
tree | c2d0e1a6fde7dd9fa4f13389887747dea2cf45aa /engines/scumm | |
parent | ffc2a93daa8d0dd4fed97427ae7f00e4194b26c4 (diff) | |
download | scummvm-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 'engines/scumm')
-rw-r--r-- | engines/scumm/player_towns.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/scumm/player_towns.cpp b/engines/scumm/player_towns.cpp index 5d49478cb0..15b2f65797 100644 --- a/engines/scumm/player_towns.cpp +++ b/engines/scumm/player_towns.cpp @@ -581,11 +581,14 @@ Player_Towns_v2::Player_Towns_v2(ScummEngine *vm, Audio::Mixer *mixer, IMuse *im } Player_Towns_v2::~Player_Towns_v2() { - delete _intf; - _intf = 0; - + // Avoid lockup in imuse.cpp, line 78 + _intf->lockInternal(); if (_imuseDispose) delete _imuse; + _intf->unlockInternal(); + + delete _intf; + _intf = 0; delete[] _sblData; delete[] _soundOverride; |