From 06c576a94591df6672c90ec40cb5941e4fcce756 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 26 Aug 2009 21:49:38 -0700 Subject: Support disconnect for OSS and Solaris --- Alc/oss.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Alc/oss.c') 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) -- cgit v1.2.3