[vlc-commits] qt: handle "--no-volume-save" for mmdevice

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


vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 27 13:31:59 2018 +0100| [e10231cf7ca34a9f99339171566279141a89bdb7] | committer: Thomas Guillem

qt: handle "--no-volume-save" for mmdevice

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

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

 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 29aa90b627..a811714e4e 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"))
@@ -1115,6 +1115,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" ) )



More information about the vlc-commits mailing list