From 70378925b0a9dbc58cc49e7888afcf4b7d55a17c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 1 Dec 2016 18:34:29 -0800 Subject: Warn when a given device name isn't found for OSS --- Alc/backends/oss.c | 14 ++++++++++---- 1 file 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); -- cgit v1.2.3