diff options
author | Chris Robinson <[email protected]> | 2009-08-26 21:49:38 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-08-26 21:49:38 -0700 |
commit | 06c576a94591df6672c90ec40cb5941e4fcce756 (patch) | |
tree | cf69c632debe1f5b569ef3b69cf1c2f29aac005a /Alc/oss.c | |
parent | 929b025fd617aa7634cd24045911c589c935d0fa (diff) |
Support disconnect for OSS and Solaris
Diffstat (limited to 'Alc/oss.c')
-rw-r--r-- | Alc/oss.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) |