[vlc-commits] qt: handle "--no-volume-save" for mmdevice
Thomas Guillem
git at videolan.org
Wed Feb 28 13:55:50 CET 2018
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Feb 27 13:31:59 2018 +0100| [733291cbef5f0f24b36dfe30fe890db527b58070] | committer: Thomas Guillem
qt: handle "--no-volume-save" for mmdevice
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=733291cbef5f0f24b36dfe30fe890db527b58070
---
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