diff options
author | Max Horn | 2008-09-03 15:22:19 +0000 |
---|---|---|
committer | Max Horn | 2008-09-03 15:22:19 +0000 |
commit | 55a05dc0f4c7141de44008148bbcb7add4c1b078 (patch) | |
tree | 74525cdb279a5619815bf4b301ab1e743424b931 /backends | |
parent | 196ce8eb98aa49b7661933f2fad91b2294c83e75 (diff) | |
download | scummvm-rg350-55a05dc0f4c7141de44008148bbcb7add4c1b078.tar.gz scummvm-rg350-55a05dc0f4c7141de44008148bbcb7add4c1b078.tar.bz2 scummvm-rg350-55a05dc0f4c7141de44008148bbcb7add4c1b078.zip |
Some cleanup by peres
svn-id: r34308
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 11 | ||||
-rw-r--r-- | backends/saves/default/default-saves.cpp | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 6554483eda..1332cbc16d 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -34,7 +34,6 @@ #include "backends/platform/sdl/sdl.h" #include "common/config-manager.h" #include "common/events.h" -#include "common/file.h" #include "common/util.h" #include "backends/saves/default/default-saves.h" @@ -516,7 +515,7 @@ void OSystem_SDL::mixerProducerThread() { // Generate samples and put them into the next buffer nextSoundBuffer = _activeSoundBuf ^ 1; _mixer->mixCallback(_soundBuffers[nextSoundBuffer], _soundBufSize); - + // Swap buffers _activeSoundBuf = nextSoundBuffer; } @@ -560,7 +559,7 @@ void OSystem_SDL::deinitThreadedMixer() { SDL_CondBroadcast(_soundCond); SDL_WaitThread(_soundThread, NULL); - // Kill the mutex & cond variables. + // Kill the mutex & cond variables. // Attention: AT this point, the mixer callback must not be running // anymore, else we will crash! SDL_DestroyMutex(_soundMutex); @@ -583,10 +582,10 @@ void OSystem_SDL::mixCallback(void *arg, byte *samples, int len) { // Lock mutex, to ensure our data is not overwritten by the producer thread SDL_LockMutex(this_->_soundMutex); - + // Copy data from the current sound buffer memcpy(samples, this_->_soundBuffers[this_->_activeSoundBuf], len); - + // Unlock mutex and wake up the produced thread SDL_UnlockMutex(this_->_soundMutex); SDL_CondSignal(this_->_soundCond); @@ -646,7 +645,7 @@ void OSystem_SDL::setupMixer() { // even if it didn't. Probably only happens for "weird" rates, though. _samplesPerSec = obtained.freq; debug(1, "Output sample rate: %d Hz", _samplesPerSec); - + // Tell the mixer that we are ready and start the sound processing _mixer->setOutputRate(_samplesPerSec); _mixer->setReady(true); diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp index c4c6f128a8..bc326d615a 100644 --- a/backends/saves/default/default-saves.cpp +++ b/backends/saves/default/default-saves.cpp @@ -28,7 +28,6 @@ #include "common/savefile.h" #include "common/util.h" #include "common/fs.h" -#include "common/file.h" #include "common/config-manager.h" #include "backends/saves/default/default-saves.h" #include "backends/saves/compressed/compressed-saves.h" |