diff options
author | Johannes Schickel | 2010-01-02 00:54:11 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-02 00:54:11 +0000 |
commit | c671c17258e2badd261ba0fdd63207a4b733b05a (patch) | |
tree | 33b9e550433832fbc6855a7aa101c29425fd8e8f /engines | |
parent | 032b23e8d869912fbc93e40f7ccaf796ba0c8ef7 (diff) | |
download | scummvm-rg350-c671c17258e2badd261ba0fdd63207a4b733b05a.tar.gz scummvm-rg350-c671c17258e2badd261ba0fdd63207a4b733b05a.tar.bz2 scummvm-rg350-c671c17258e2badd261ba0fdd63207a4b733b05a.zip |
Use Common::StackLock.
svn-id: r46870
Diffstat (limited to 'engines')
-rw-r--r-- | engines/kyra/sound_adlib.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp index f2352b4983..3da1204a5d 100644 --- a/engines/kyra/sound_adlib.cpp +++ b/engines/kyra/sound_adlib.cpp @@ -410,9 +410,6 @@ private: Audio::SoundHandle _soundHandle; bool _v2; - - void lock() { _mutex.lock(); } - void unlock() { _mutex.unlock(); } }; AdlibDriver::AdlibDriver(Audio::Mixer *mixer, bool v2) { @@ -471,7 +468,7 @@ AdlibDriver::~AdlibDriver() { } int AdlibDriver::callback(int opcode, ...) { - lock(); + Common::StackLock lock(_mutex); if (opcode >= _opcodesEntries || opcode < 0) { warning("AdlibDriver: calling unknown opcode '%d'", opcode); return 0; @@ -483,7 +480,6 @@ int AdlibDriver::callback(int opcode, ...) { va_start(args, opcode); int returnValue = (this->*(_opcodeList[opcode].function))(args); va_end(args); - unlock(); return returnValue; } @@ -634,7 +630,7 @@ int AdlibDriver::snd_clearFlag(va_list &list) { // timer callback void AdlibDriver::callback() { - lock(); + Common::StackLock lock(_mutex); --_flagTrigger; if (_flagTrigger < 0) _flags &= ~8; @@ -649,7 +645,6 @@ void AdlibDriver::callback() { ++_unkValue4; } } - unlock(); } void AdlibDriver::setupPrograms() { |