diff options
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alSource.c | 5 | ||||
-rw-r--r-- | OpenAL32/event.c | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 02511382..40b2c494 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -248,9 +248,8 @@ static void SendStateChangeEvent(ALCcontext *context, ALuint id, ALenum state) * and we don't want state change messages to occur out of order, so send * it through the async queue to ensure proper ordering. */ - if(ll_ringbuffer_write_space(context->AsyncEvents) > 0) - ll_ringbuffer_write(context->AsyncEvents, (const char*)&evt, 1); - alsem_post(&context->EventSem); + if(ll_ringbuffer_write(context->AsyncEvents, (const char*)&evt, 1) == 1) + alsem_post(&context->EventSem); } diff --git a/OpenAL32/event.c b/OpenAL32/event.c index 1189e889..12636489 100644 --- a/OpenAL32/event.c +++ b/OpenAL32/event.c @@ -102,9 +102,8 @@ AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, A if(isrunning && !(enabledevts&~flags)) { static const AsyncEvent kill_evt = { 0 }; - while(ll_ringbuffer_write_space(context->AsyncEvents) == 0) + while(ll_ringbuffer_write(context->AsyncEvents, (const char*)&kill_evt, 1) == 0) althrd_yield(); - ll_ringbuffer_write(context->AsyncEvents, (const char*)&kill_evt, 1); alsem_post(&context->EventSem); althrd_join(context->EventThread, NULL); } |