Commit 77a6d341 authored by Rein Klazes's avatar Rein Klazes Committed by Alexandre Julliard

Break from the SNDCTL_DSP_CHANNELS loops on first error instead of

continuing with even higher channels numbers.
parent 7f5c0de9
......@@ -788,6 +788,7 @@ static BOOL OSS_WaveOutInit(OSS_DEVICE* ossdev)
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* ossdev)
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_DEVICE* ossdev)
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment