[vlc-commits] DirectSound: list devices (fixes #7868)

Rémi Denis-Courmont git at videolan.org
Wed Apr 24 21:04:43 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 24 21:23:00 2013 +0300| [35e1164bf3b7efeedfaa70744585083b777c2579] | committer: Rémi Denis-Courmont

DirectSound: list devices (fixes #7868)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=35e1164bf3b7efeedfaa70744585083b777c2579
---

 modules/audio_output/directx.c |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index 04908ab..e3b9cd1 100644
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -994,6 +994,20 @@ static int Open(vlc_object_t *obj)
         return VLC_EGENERIC;
     }
 
+    /* DirectSound does not support hot-plug events (unless with WASAPI) */
+    char **ids, **names;
+    int count = ReloadDirectXDevices(obj, NULL, &ids, &names);
+    if (count >= 0)
+    {
+        for (int i = 0; i < count; i++)
+        {
+            aout_HotplugReport(aout, ids[i], names[i]);
+            free(names[i]);
+            free(ids[i]);
+        }
+        free(names);
+        free(ids);
+    }
     return VLC_SUCCESS;
 }
 



More information about the vlc-commits mailing list