aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/alsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/alsa.c')
-rw-r--r--Alc/backends/alsa.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Alc/backends/alsa.c b/Alc/backends/alsa.c
index 035d38e9..5ff6307f 100644
--- a/Alc/backends/alsa.c
+++ b/Alc/backends/alsa.c
@@ -472,7 +472,9 @@ static ALuint ALSAProc(ALvoid *ptr)
if(state < 0)
{
ERR("Invalid state detected: %s\n", snd_strerror(state));
+ ALCdevice_Lock(Device);
aluHandleDisconnect(Device);
+ ALCdevice_Unlock(Device);
break;
}
@@ -559,7 +561,9 @@ static ALuint ALSANoMMapProc(ALvoid *ptr)
if(state < 0)
{
ERR("Invalid state detected: %s\n", snd_strerror(state));
+ ALCdevice_Lock(Device);
aluHandleDisconnect(Device);
+ ALCdevice_Unlock(Device);
break;
}