mirror of https://github.com/encounter/SDL.git
get rid of SkipMixerLock
This commit is contained in:
parent
3c85cef46c
commit
6fcfcc3d6f
|
@ -334,11 +334,6 @@ SDL_AudioUnlockDevice_Default(SDL_AudioDevice * device)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
SDL_AudioLockOrUnlockDeviceWithNoMixerLock(SDL_AudioDevice * device)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
finish_audio_entry_points_init(void)
|
finish_audio_entry_points_init(void)
|
||||||
{
|
{
|
||||||
|
@ -347,14 +342,6 @@ finish_audio_entry_points_init(void)
|
||||||
* blindly call them without having to check for validity first.
|
* blindly call them without having to check for validity first.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (current_audio.impl.SkipMixerLock) {
|
|
||||||
if (current_audio.impl.LockDevice == NULL) {
|
|
||||||
current_audio.impl.LockDevice = SDL_AudioLockOrUnlockDeviceWithNoMixerLock;
|
|
||||||
}
|
|
||||||
if (current_audio.impl.UnlockDevice == NULL) {
|
|
||||||
current_audio.impl.UnlockDevice = SDL_AudioLockOrUnlockDeviceWithNoMixerLock;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define FILL_STUB(x) \
|
#define FILL_STUB(x) \
|
||||||
if (current_audio.impl.x == NULL) { \
|
if (current_audio.impl.x == NULL) { \
|
||||||
|
@ -1421,7 +1408,7 @@ open_audio_device(const char *devname, int iscapture,
|
||||||
SDL_AtomicSet(&device->enabled, 1);
|
SDL_AtomicSet(&device->enabled, 1);
|
||||||
|
|
||||||
/* Create a mutex for locking the sound buffers */
|
/* Create a mutex for locking the sound buffers */
|
||||||
if (!current_audio.impl.SkipMixerLock) {
|
if (current_audio.impl.LockDevice == SDL_AudioLockDevice_Default) {
|
||||||
device->mixer_lock = SDL_CreateMutex();
|
device->mixer_lock = SDL_CreateMutex();
|
||||||
if (device->mixer_lock == NULL) {
|
if (device->mixer_lock == NULL) {
|
||||||
close_audio_device(device);
|
close_audio_device(device);
|
||||||
|
|
|
@ -86,7 +86,6 @@ typedef struct SDL_AudioDriverImpl
|
||||||
/* Some flags to push duplicate code into the core and reduce #ifdefs. */
|
/* Some flags to push duplicate code into the core and reduce #ifdefs. */
|
||||||
/* !!! FIXME: these should be SDL_bool */
|
/* !!! FIXME: these should be SDL_bool */
|
||||||
int ProvidesOwnCallbackThread;
|
int ProvidesOwnCallbackThread;
|
||||||
int SkipMixerLock;
|
|
||||||
int HasCaptureSupport;
|
int HasCaptureSupport;
|
||||||
int OnlyHasDefaultOutputDevice;
|
int OnlyHasDefaultOutputDevice;
|
||||||
int OnlyHasDefaultCaptureDevice;
|
int OnlyHasDefaultCaptureDevice;
|
||||||
|
|
|
@ -339,6 +339,11 @@ EMSCRIPTENAUDIO_OpenDevice(_THIS, void *handle, const char *devname, int iscaptu
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
EMSCRIPTENAUDIO_LockOrUnlockDeviceWithNoMixerLock(SDL_AudioDevice * device)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl)
|
EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||||
{
|
{
|
||||||
|
@ -352,7 +357,7 @@ EMSCRIPTENAUDIO_Init(SDL_AudioDriverImpl * impl)
|
||||||
impl->OnlyHasDefaultOutputDevice = 1;
|
impl->OnlyHasDefaultOutputDevice = 1;
|
||||||
|
|
||||||
/* no threads here */
|
/* no threads here */
|
||||||
impl->SkipMixerLock = 1;
|
impl->LockDevice = impl->UnlockDevice = EMSCRIPTENAUDIO_LockOrUnlockDeviceWithNoMixerLock;
|
||||||
impl->ProvidesOwnCallbackThread = 1;
|
impl->ProvidesOwnCallbackThread = 1;
|
||||||
|
|
||||||
/* check availability */
|
/* check availability */
|
||||||
|
|
|
@ -659,7 +659,6 @@ QSA_Init(SDL_AudioDriverImpl * impl)
|
||||||
impl->UnlockDevice = NULL;
|
impl->UnlockDevice = NULL;
|
||||||
|
|
||||||
impl->ProvidesOwnCallbackThread = 0;
|
impl->ProvidesOwnCallbackThread = 0;
|
||||||
impl->SkipMixerLock = 0;
|
|
||||||
impl->HasCaptureSupport = 1;
|
impl->HasCaptureSupport = 1;
|
||||||
impl->OnlyHasDefaultOutputDevice = 0;
|
impl->OnlyHasDefaultOutputDevice = 0;
|
||||||
impl->OnlyHasDefaultCaptureDevice = 0;
|
impl->OnlyHasDefaultCaptureDevice = 0;
|
||||||
|
|
Loading…
Reference in New Issue