diff --git a/src/audio/n3ds/SDL_n3dsaudio.c b/src/audio/n3ds/SDL_n3dsaudio.c index ddf4e3aae..12ebb843f 100644 --- a/src/audio/n3ds/SDL_n3dsaudio.c +++ b/src/audio/n3ds/SDL_n3dsaudio.c @@ -38,6 +38,7 @@ static SDL_AudioDevice *audio_device; static void FreePrivateData(_THIS); static int FindAudioFormat(_THIS); +/* fully local functions related to the wavebufs / DSP, not the same as the SDL-wide mixer lock */ static SDL_INLINE void contextLock(_THIS) { LightLock_Lock(&this->hidden->lock); @@ -48,16 +49,6 @@ static SDL_INLINE void contextUnlock(_THIS) LightLock_Unlock(&this->hidden->lock); } -static void N3DSAUD_LockAudio(_THIS) -{ - contextLock(this); -} - -static void N3DSAUD_UnlockAudio(_THIS) -{ - contextUnlock(this); -} - static void N3DSAUD_DspHook(DSP_HookType hook) { if (hook == DSPHOOK_ONCANCEL) { @@ -195,6 +186,7 @@ static void N3DSAUDIO_PlayDevice(_THIS) { size_t nextbuf; size_t sampleLen; + contextLock(this); nextbuf = this->hidden->nextbuf; @@ -271,8 +263,6 @@ static SDL_bool N3DSAUDIO_Init(SDL_AudioDriverImpl *impl) impl->GetDeviceBuf = N3DSAUDIO_GetDeviceBuf; impl->CloseDevice = N3DSAUDIO_CloseDevice; impl->ThreadInit = N3DSAUDIO_ThreadInit; - impl->LockDevice = N3DSAUD_LockAudio; - impl->UnlockDevice = N3DSAUD_UnlockAudio; impl->OnlyHasDefaultOutputDevice = SDL_TRUE; /* Should be possible, but micInit would fail */