aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/pulseaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/backends/pulseaudio.c')
-rw-r--r--Alc/backends/pulseaudio.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c
index e80ee0bd..a4be58e2 100644
--- a/Alc/backends/pulseaudio.c
+++ b/Alc/backends/pulseaudio.c
@@ -525,6 +525,7 @@ static void sink_device_callback(pa_context *context, const pa_sink_info *info,
{
pa_threaded_mainloop *loop = pdata;
void *temp;
+ ALuint i;
(void)context;
@@ -534,6 +535,12 @@ static void sink_device_callback(pa_context *context, const pa_sink_info *info,
return;
}
+ for(i = 0;i < numDevNames;i++)
+ {
+ if(strcmp(info->name, allDevNameMap[i].device_name) == 0)
+ return;
+ }
+
TRACE("Got device \"%s\", \"%s\"\n", info->description, info->name);
temp = realloc(allDevNameMap, (numDevNames+1) * sizeof(*allDevNameMap));
@@ -550,6 +557,7 @@ static void source_device_callback(pa_context *context, const pa_source_info *in
{
pa_threaded_mainloop *loop = pdata;
void *temp;
+ ALuint i;
(void)context;
@@ -559,6 +567,12 @@ static void source_device_callback(pa_context *context, const pa_source_info *in
return;
}
+ for(i = 0;i < numCaptureDevNames;i++)
+ {
+ if(strcmp(info->name, allCaptureDevNameMap[i].device_name) == 0)
+ return;
+ }
+
TRACE("Got device \"%s\", \"%s\"\n", info->description, info->name);
temp = realloc(allCaptureDevNameMap, (numCaptureDevNames+1) * sizeof(*allCaptureDevNameMap));