diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/mixer.cpp | 1 | ||||
-rw-r--r-- | sound/mixer.h | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sound/mixer.cpp b/sound/mixer.cpp index 666f31e1a7..6be55b866d 100644 --- a/sound/mixer.cpp +++ b/sound/mixer.cpp @@ -356,6 +356,7 @@ bool SoundMixer::isActiveChannel(int index) { } void SoundMixer::setupPremix(void *param, PremixProc *proc) { + StackLock lock(_mutex); _premixParam = param; _premixProc = proc; } diff --git a/sound/mixer.h b/sound/mixer.h index 5cea147749..e5e9149132 100644 --- a/sound/mixer.h +++ b/sound/mixer.h @@ -51,8 +51,6 @@ public: }; private: - static void onGenerateSamples(void *s, byte *samples, int len); - OSystem *_syst; OSystem::MutexRef _mutex; @@ -95,9 +93,6 @@ public: /** Premix procedure, useful when using fmopl adlib */ void setupPremix(void * param, PremixProc * proc); - /** mix */ - void mix(int16 * buf, uint len); - /** stop all currently playing sounds */ void stopAll(); @@ -138,6 +133,11 @@ public: private: int insertChannel(PlayingSoundHandle *handle, Channel *chan); + + /** mix */ + void mix(int16 * buf, uint len); + + static void onGenerateSamples(void *s, byte *samples, int len); }; #endif |