aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2016-12-01 18:34:29 -0800
committerChris Robinson <[email protected]>2016-12-01 18:34:29 -0800
commit70378925b0a9dbc58cc49e7888afcf4b7d55a17c (patch)
tree5461e2861bae628c22686fb07fb652847215fb07 /Alc/backends
parent66569295e5ac27dcddb4f20d25a30801af7ca992 (diff)
Warn when a given device name isn't found for OSS
Diffstat (limited to 'Alc/backends')
-rw-r--r--Alc/backends/oss.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/Alc/backends/oss.c b/Alc/backends/oss.c
index 41f2c39f..689a5c71 100644
--- a/Alc/backends/oss.c
+++ b/Alc/backends/oss.c
@@ -328,14 +328,17 @@ static ALCenum ALCplaybackOSS_open(ALCplaybackOSS *self, const ALCchar *name)
ALCossListPopulate(&oss_playback, DSP_CAP_OUTPUT);
dev = &oss_playback;
}
- while (dev != NULL)
+ while(dev != NULL)
{
if (strcmp(dev->handle, name) == 0)
break;
dev = dev->next;
}
- if (dev == NULL)
+ if(dev == NULL)
+ {
+ WARN("Could not find \"%s\" in device list\n", name);
return ALC_INVALID_VALUE;
+ }
}
self->killNow = 0;
@@ -587,14 +590,17 @@ static ALCenum ALCcaptureOSS_open(ALCcaptureOSS *self, const ALCchar *name)
ALCossListPopulate(&oss_capture, DSP_CAP_INPUT);
dev = &oss_capture;
}
- while (dev != NULL)
+ while(dev != NULL)
{
if (strcmp(dev->handle, name) == 0)
break;
dev = dev->next;
}
- if (dev == NULL)
+ if(dev == NULL)
+ {
+ WARN("Could not find \"%s\" in device list\n", name);
return ALC_INVALID_VALUE;
+ }
}
self->fd = open(dev->path, O_RDONLY);