aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/oss.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-14 04:02:58 -0700
committerChris Robinson <[email protected]>2011-06-14 04:02:58 -0700
commit53c5275aa4ea9c42d850cf3f2d9fe589a7c84924 (patch)
tree2de994091bfee13326534878ad4f770a1e36fe56 /Alc/oss.c
parentc93d7a1721dc8233d0a256c022ab55223c582062 (diff)
Use a proper enum for the probe type
Diffstat (limited to 'Alc/oss.c')
-rw-r--r--Alc/oss.c42
1 files changed, 25 insertions, 17 deletions
diff --git a/Alc/oss.c b/Alc/oss.c
index bcf221c8..c81829aa 100644
--- a/Alc/oss.c
+++ b/Alc/oss.c
@@ -498,30 +498,38 @@ void alc_oss_deinit(void)
{
}
-void alc_oss_probe(int type)
+void alc_oss_probe(enum DevProbe type)
{
- if(type == DEVICE_PROBE)
+ switch(type)
{
+ case DEVICE_PROBE:
+ {
#ifdef HAVE_STAT
- struct stat buf;
- if(stat(GetConfigValue("oss", "device", "/dev/dsp"), &buf) == 0)
+ struct stat buf;
+ if(stat(GetConfigValue("oss", "device", "/dev/dsp"), &buf) == 0)
#endif
- AppendDeviceList(oss_device);
- }
- else if(type == ALL_DEVICE_PROBE)
- {
+ AppendDeviceList(oss_device);
+ }
+ break;
+
+ case ALL_DEVICE_PROBE:
+ {
#ifdef HAVE_STAT
- struct stat buf;
- if(stat(GetConfigValue("oss", "device", "/dev/dsp"), &buf) == 0)
+ struct stat buf;
+ if(stat(GetConfigValue("oss", "device", "/dev/dsp"), &buf) == 0)
#endif
- AppendAllDeviceList(oss_device);
- }
- else if(type == CAPTURE_DEVICE_PROBE)
- {
+ AppendAllDeviceList(oss_device);
+ }
+ break;
+
+ case CAPTURE_DEVICE_PROBE:
+ {
#ifdef HAVE_STAT
- struct stat buf;
- if(stat(GetConfigValue("oss", "capture", "/dev/dsp"), &buf) == 0)
+ struct stat buf;
+ if(stat(GetConfigValue("oss", "capture", "/dev/dsp"), &buf) == 0)
#endif
- AppendCaptureDeviceList(oss_device);
+ AppendCaptureDeviceList(oss_device);
+ }
+ break;
}
}