diff options
author | Sven Hesse | 2007-04-13 13:09:00 +0000 |
---|---|---|
committer | Sven Hesse | 2007-04-13 13:09:00 +0000 |
commit | 6895085dff9dbcaf9593cb4ca931781920fcd9b3 (patch) | |
tree | dd24b1185752afeeca94710d59a5644ca4b174a5 | |
parent | bf3182abb8a34cdce93613f66bf013092b700ea2 (diff) | |
download | scummvm-rg350-6895085dff9dbcaf9593cb4ca931781920fcd9b3.tar.gz scummvm-rg350-6895085dff9dbcaf9593cb4ca931781920fcd9b3.tar.bz2 scummvm-rg350-6895085dff9dbcaf9593cb4ca931781920fcd9b3.zip |
Moving the mutex locking out of the loop
svn-id: r26460
-rw-r--r-- | engines/gob/sound.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/gob/sound.cpp b/engines/gob/sound.cpp index 8494e1da07..c2e48adac1 100644 --- a/engines/gob/sound.cpp +++ b/engines/gob/sound.cpp @@ -382,9 +382,9 @@ void Snd::checkEndSample() { } int Snd::readBuffer(int16 *buffer, const int numSamples) { - for (int i = 0; i < numSamples; i++) { - Common::StackLock slock(_mutex); + Common::StackLock slock(_mutex); + for (int i = 0; i < numSamples; i++) { if (!_data) return i; if (_end || (_offset >= _length)) |