Commit e10231cf authored by Thomas Guillem's avatar Thomas Guillem

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

(cherry picked from commit 733291cb)
Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent 576c4fe7
...@@ -142,7 +142,7 @@ static int getDefaultAudioVolume(vlc_object_t *obj, const char *aout) ...@@ -142,7 +142,7 @@ static int getDefaultAudioVolume(vlc_object_t *obj, const char *aout)
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
if (!strcmp(aout, "mmdevice")) if (!strcmp(aout, "mmdevice"))
return -1; return config_GetFloat(obj, "mmdevice-volume") * 100.f + .5f;
else else
#endif #endif
if (!strcmp(aout, "sndio")) if (!strcmp(aout, "sndio"))
...@@ -1115,6 +1115,8 @@ void SPrefsPanel::apply() ...@@ -1115,6 +1115,8 @@ void SPrefsPanel::apply()
//FIXME this is moot //FIXME this is moot
#if defined( _WIN32 ) #if defined( _WIN32 )
VLC_UNUSED( f_gain ); VLC_UNUSED( f_gain );
if( save_vol_aout( "mmdevice" ) )
config_PutFloat( p_intf, "mmdevice-volume", i_volume / 100.f );
if( save_vol_aout( "directsound" ) ) if( save_vol_aout( "directsound" ) )
config_PutFloat( p_intf, "directx-volume", i_volume / 100.f ); config_PutFloat( p_intf, "directx-volume", i_volume / 100.f );
if( save_vol_aout( "waveout" ) ) if( save_vol_aout( "waveout" ) )
......
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