[vlc-devel] [PATCH 2/2] qt: handle "--no-volume-save" for mmdevice

Thomas Guillem thomas at gllm.fr
Tue Feb 27 13:59:49 CET 2018


---
 modules/gui/qt/components/simple_preferences.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/components/simple_preferences.cpp b/modules/gui/qt/components/simple_preferences.cpp
index ec8f823e43..d50df1c691 100644
--- a/modules/gui/qt/components/simple_preferences.cpp
+++ b/modules/gui/qt/components/simple_preferences.cpp
@@ -142,7 +142,7 @@ static int getDefaultAudioVolume(vlc_object_t *obj, const char *aout)
 #endif
 #ifdef _WIN32
     if (!strcmp(aout, "mmdevice"))
-        return -1;
+        return config_GetFloat(obj, "mmdevice-volume") * 100.f + .5f;
     else
 #endif
     if (!strcmp(aout, "sndio"))
@@ -1127,6 +1127,8 @@ void SPrefsPanel::apply()
         //FIXME this is moot
 #if defined( _WIN32 )
         VLC_UNUSED( f_gain );
+        if( save_vol_aout( "mmdevice" ) )
+            config_PutFloat( p_intf, "mmdevice-volume", i_volume / 100.f );
         if( save_vol_aout( "directsound" ) )
             config_PutFloat( p_intf, "directx-volume", i_volume / 100.f );
         if( save_vol_aout( "waveout" ) )
-- 
2.11.0



More information about the vlc-devel mailing list