wine/dlls/winmm/wineoss audio.c
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Nov 21 05:56:55 CST 2005
ChangeSet ID: 21347
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/21 05:56:55
Modified files:
dlls/winmm/wineoss: audio.c
Log message:
Rein Klazes <wijn at wanadoo.nl>
Break from the SNDCTL_DSP_CHANNELS loops on first error instead of
continuing with even higher channels numbers.
Patch: http://cvs.winehq.org/patch.py?id=21347
Old revision New revision Changes Path
1.166 1.167 +3 -0 wine/dlls/winmm/wineoss/audio.c
Index: wine/dlls/winmm/wineoss/audio.c
diff -u -p wine/dlls/winmm/wineoss/audio.c:1.166 wine/dlls/winmm/wineoss/audio.c:1.167
--- wine/dlls/winmm/wineoss/audio.c:1.166 21 Nov 2005 11:56:55 -0000
+++ wine/dlls/winmm/wineoss/audio.c 21 Nov 2005 11:56:55 -0000
@@ -788,6 +788,7 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE*
for (c = 1; c <= MAX_CHANNELS; c++) {
arg=c;
rc=ioctl(ossdev->fd, SNDCTL_DSP_CHANNELS, &arg);
+ if( rc == -1) break;
if (rc!=0 || arg!=c) {
TRACE("DSP_CHANNELS: rc=%d returned %d for %d\n",rc,arg,c);
continue;
@@ -927,6 +928,7 @@ static BOOL OSS_WaveInInit(OSS_DEVICE* o
for (c = 1; c <= MAX_CHANNELS; c++) {
arg=c;
rc=ioctl(ossdev->fd, SNDCTL_DSP_CHANNELS, &arg);
+ if( rc == -1) break;
if (rc!=0 || arg!=c) {
TRACE("DSP_CHANNELS: rc=%d returned %d for %d\n",rc,arg,c);
continue;
@@ -1019,6 +1021,7 @@ static void OSS_WaveFullDuplexInit(OSS_D
for (c = 1; c <= MAX_CHANNELS; c++) {
arg=c;
rc=ioctl(ossdev->fd, SNDCTL_DSP_CHANNELS, &arg);
+ if( rc == -1) break;
if (rc!=0 || arg!=c) {
TRACE("DSP_CHANNELS: rc=%d returned %d for %d\n",rc,arg,c);
continue;
More information about the wine-cvs
mailing list