aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/oss.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-26 21:49:38 -0700
committerChris Robinson <[email protected]>2009-08-26 21:49:38 -0700
commit06c576a94591df6672c90ec40cb5941e4fcce756 (patch)
treecf69c632debe1f5b569ef3b69cf1c2f29aac005a /Alc/oss.c
parent929b025fd617aa7634cd24045911c589c935d0fa (diff)
Support disconnect for OSS and Solaris
Diffstat (limited to 'Alc/oss.c')
-rw-r--r--Alc/oss.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Alc/oss.c b/Alc/oss.c
index 83f8fe55..76455f58 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -81,7 +81,7 @@ static ALuint OSSProc(ALvoid *ptr)
oss_data *data = (oss_data*)pDevice->ExtraData;
int wrote;
- while(!data->killNow)
+ while(!data->killNow && !pDevice->Connected)
{
ALint len = data->data_size;
ALubyte *WritePtr = data->mix_data;
@@ -98,6 +98,7 @@ static ALuint OSSProc(ALvoid *ptr)
if(errno != EAGAIN && errno != EWOULDBLOCK)
{
AL_PRINT("write failed: %s\n", strerror(errno));
+ aluHandleDisconnect(pDevice);
len = 0;
}
else
@@ -129,6 +130,7 @@ static ALuint OSSCaptureProc(ALvoid *ptr)
if(amt < 0)
{
AL_PRINT("read failed: %s\n", strerror(errno));
+ aluHandleDisconnect(pDevice);
break;
}
if(amt == 0)