Commit 576c4fe7 authored by Thomas Guillem's avatar 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 cf143a51)
Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent 426a0cd0
...@@ -490,6 +490,12 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -490,6 +490,12 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
#endif #endif
#ifdef _WIN32 #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, CONFIG_GENERIC( "mmdevice-passthrough", IntegerList,
ui.mmdevicePassthroughLabel, mmdevicePassthroughBox ); ui.mmdevicePassthroughLabel, mmdevicePassthroughBox );
optionWidgets["mmdevicePassthroughL"] = ui.mmdevicePassthroughLabel; optionWidgets["mmdevicePassthroughL"] = ui.mmdevicePassthroughLabel;
...@@ -961,6 +967,8 @@ void SPrefsPanel::updateAudioOptions( int number) ...@@ -961,6 +967,8 @@ void SPrefsPanel::updateAudioOptions( int number)
const bool mmDeviceEnabled = value == "mmdevice" || value == "any"; const bool mmDeviceEnabled = value == "mmdevice" || value == "any";
optionWidgets["mmdevicePassthroughL"]->setVisible( mmDeviceEnabled ); optionWidgets["mmdevicePassthroughL"]->setVisible( mmDeviceEnabled );
optionWidgets["mmdevicePassthroughB"]->setVisible( mmDeviceEnabled ); optionWidgets["mmdevicePassthroughB"]->setVisible( mmDeviceEnabled );
optionWidgets["mmdeviceW"]->setVisible( mmDeviceEnabled );
optionWidgets["mmdeviceL"]->setVisible( mmDeviceEnabled );
optionWidgets["directxW"]->setVisible( ( value == "directsound" ) ); optionWidgets["directxW"]->setVisible( ( value == "directsound" ) );
optionWidgets["directxL"]->setVisible( ( value == "directsound" ) ); optionWidgets["directxL"]->setVisible( ( value == "directsound" ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment