From 2fa53c05317dd274ef7a226901087641c2313770 Mon Sep 17 00:00:00 2001 From: "A. L'mao" Date: Fri, 28 Nov 2014 22:08:31 -0800 Subject: [PATCH] Destroy AL context before closing dhndl fixes seggy on os x, i think --- src/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device.c b/src/device.c index 223ca38..087d526 100644 --- a/src/device.c +++ b/src/device.c @@ -323,9 +323,9 @@ DeviceError close_device(DeviceType type, uint32_t device_idx) alDeleteSources(1, &device->source); alDeleteBuffers(OPENAL_BUFS, device->buffers); - if ( !alcCloseDevice(device->dhndl) ) rc = de_AlError; alcMakeContextCurrent(NULL); if ( device->ctx ) alcDestroyContext(device->ctx); + if ( !alcCloseDevice(device->dhndl) ) rc = de_AlError; } free(device);