[vlc-commits] DirectSound: list devices (fixes #7868)
Rémi Denis-Courmont
git at videolan.org
Wed Apr 24 20:24:10 CEST 2013
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 24 21:23:00 2013 +0300| [36b8c61601bd350091599abaaf9a31d92ed3a71c] | committer: Rémi Denis-Courmont
DirectSound: list devices (fixes #7868)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=36b8c61601bd350091599abaaf9a31d92ed3a71c
---
modules/audio_output/directx.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index 04908ab..ddd1241 100644
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -253,6 +253,21 @@ static int Start( audio_output_t *p_aout, audio_sample_format_t *restrict fmt )
p_aout->pause = Pause;
p_aout->flush = Flush;
+ /* DirectSound does not support hot-plug events (unless with WASAPI) */
+ char **ids, **names;
+ int count = ReloadDirectXDevices(VLC_OBJECT(p_aout), NULL, &ids, &names);
+ if (count >= 0)
+ {
+ for (int i = 0; i < count; i++)
+ {
+ aout_HotplugReport(p_aout, ids[i], names[i]);
+ free(names[i]);
+ free(ids[i]);
+ }
+ free(names);
+ free(ids);
+ }
+
return VLC_SUCCESS;
error:
More information about the vlc-commits
mailing list