mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-19 00:15:30 +00:00
mix() is really a private method, only to be called by the audio thread; cover setupPremix by the mutex, too (that helps preventing race conditions upon exit)
svn-id: r8809
This commit is contained in:
parent
b6c3d440b5
commit
7e4fa4a1da
@ -356,6 +356,7 @@ bool SoundMixer::isActiveChannel(int index) {
|
||||
}
|
||||
|
||||
void SoundMixer::setupPremix(void *param, PremixProc *proc) {
|
||||
StackLock lock(_mutex);
|
||||
_premixParam = param;
|
||||
_premixProc = proc;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user