aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/oss.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-21 02:53:33 -0700
committerChris Robinson <[email protected]>2009-09-21 02:53:33 -0700
commite11b59a80f542e08bc877d1447f885fb0f5cc439 (patch)
tree9295577e517bf06d82eccf29700ac3b20bdfdb1c /Alc/oss.c
parent0ae02e8ad4f77287e4641ab9491c94efac2d402b (diff)
Return imediately if trying to set an unknown format
Diffstat (limited to 'Alc/oss.c')
-rw-r--r--Alc/oss.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Alc/oss.c b/Alc/oss.c
index 6cf4c495..62d3c1df 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -217,8 +217,8 @@ static ALCboolean oss_reset_playback(ALCdevice *device)
ossFormat = AFMT_S16_NE;
break;
default:
- ossFormat = -1;
- AL_PRINT("Unknown format?! %x\n", device->Format);
+ AL_PRINT("Unknown format: 0x%x\n", device->Format);
+ return ALC_FALSE;
}
periods = device->NumUpdates;
@@ -337,8 +337,10 @@ static ALCboolean oss_open_capture(ALCdevice *device, const ALCchar *deviceName)
ossFormat = AFMT_S16_NE;
break;
default:
- ossFormat = -1;
- AL_PRINT("Unknown format?! %x\n", device->Format);
+ AL_PRINT("Unknown format: 0x%x\n", device->Format);
+ close(data->fd);
+ free(data);
+ return ALC_FALSE;
}
periods = 4;