[vlc-commits] qt: add device preferences for mmdevice

Thomas Guillem git at videolan.org
Thu Mar 1 10:28:57 CET 2018


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 27 11:26:54 2018 +0100| [576c4fe7d9974cbc67def4046c1925e7b782324e] | committer: Thomas Guillem

qt: add device preferences for mmdevice

Like for other Windows aouts, this preference can be used to save the preferred
audio device that will be used across several instances of VLC.

CONFIG_AUDIO_DEVICE should also be used for others aouts (in order to forward
the device change to the aout module).

(cherry picked from commit cf143a51b73b241640b46a57b936b2ec97f1afa3)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=576c4fe7d9974cbc67def4046c1925e7b782324e
---

 modules/gui/qt/components/simple_preferences.cpp | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index 461201b47a..29aa90b627 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -490,6 +490,12 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
 #endif
 
 #ifdef _WIN32
+            audioControl( MMDevice );
+            optionWidgets["mmdeviceL" ] = MMDeviceLabel;
+            optionWidgets["mmdeviceW" ] = MMDeviceDevice;
+            CONFIG_GENERIC_NO_UI( "mmdevice-audio-device", StringList,
+                                  MMDeviceLabel, MMDeviceDevice );
+
             CONFIG_GENERIC( "mmdevice-passthrough", IntegerList,
                             ui.mmdevicePassthroughLabel, mmdevicePassthroughBox );
             optionWidgets["mmdevicePassthroughL"] = ui.mmdevicePassthroughLabel;
@@ -961,6 +967,8 @@ void SPrefsPanel::updateAudioOptions( int number)
     const bool mmDeviceEnabled = value == "mmdevice" || value == "any";
     optionWidgets["mmdevicePassthroughL"]->setVisible( mmDeviceEnabled );
     optionWidgets["mmdevicePassthroughB"]->setVisible( mmDeviceEnabled );
+    optionWidgets["mmdeviceW"]->setVisible( mmDeviceEnabled );
+    optionWidgets["mmdeviceL"]->setVisible( mmDeviceEnabled );
 
     optionWidgets["directxW"]->setVisible( ( value == "directsound" ) );
     optionWidgets["directxL"]->setVisible( ( value == "directsound" ) );



More information about the vlc-commits mailing list