[vlc-commits] auhal: implement audio device selection using the new aout API (close #8037 )

Felix Paul Kühne git at videolan.org
Thu Jan 24 14:29:43 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Jan 24 14:29:43 2013 +0100| [6c2f2991a4505ca13ec63abcce67161c8bdfa2c1] | committer: Felix Paul Kühne

auhal: implement audio device selection using the new aout API (close #8037)

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

 modules/audio_output/auhal.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index c094c1d..118e9cf 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -1041,9 +1041,13 @@ static void RebuildDeviceList(audio_output_t * p_aout)
 
 static int SwitchAudioDevice(audio_output_t *p_aout, const char *name)
 {
-    msg_Warn(p_aout, "we should switch to device '%s'", name);
+    if (name)
+        p_aout->sys->i_selected_dev = atoi(name);
+    else
+        p_aout->sys->i_selected_dev = 0;
 
     aout_DeviceReport(p_aout, name);
+    aout_RestartRequest(p_aout, AOUT_RESTART_OUTPUT);
 
     return 0;
 }



More information about the vlc-commits mailing list