aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/platform/sdl/sdl.cpp3
-rw-r--r--sound/mixer.h2
2 files changed, 4 insertions, 1 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 3e2416a791..d9bf951cf9 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -190,7 +190,8 @@ void OSystem_SDL::initBackend() {
// allow subclasses to provide their own).
if (_mixer == 0) {
_mixer = new Audio::Mixer();
- setSoundCallback(Audio::Mixer::mixCallback, _mixer);
+ bool result = setSoundCallback(Audio::Mixer::mixCallback, _mixer);
+ _mixer->setReady(result);
}
// Create and hook up the timer manager, if none exists yet (we check for
diff --git a/sound/mixer.h b/sound/mixer.h
index b799345558..bb3e3a711f 100644
--- a/sound/mixer.h
+++ b/sound/mixer.h
@@ -308,6 +308,8 @@ public:
* This simply calls the mix() method.
*/
static void mixCallback(void *s, byte *samples, int len);
+
+ void setReady(bool ready) { _mixerReady = ready; }
};