aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorMax Horn2008-09-03 15:22:19 +0000
committerMax Horn2008-09-03 15:22:19 +0000
commit55a05dc0f4c7141de44008148bbcb7add4c1b078 (patch)
tree74525cdb279a5619815bf4b301ab1e743424b931 /backends/platform/sdl
parent196ce8eb98aa49b7661933f2fad91b2294c83e75 (diff)
downloadscummvm-rg350-55a05dc0f4c7141de44008148bbcb7add4c1b078.tar.gz
scummvm-rg350-55a05dc0f4c7141de44008148bbcb7add4c1b078.tar.bz2
scummvm-rg350-55a05dc0f4c7141de44008148bbcb7add4c1b078.zip
Some cleanup by peres
svn-id: r34308
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/sdl.cpp11
1 files changed, 5 insertions, 6 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);