[vlc-devel] commit: Set 'saved-volume" in aout_VolumeSet. (Laurent Aimar )
git version control
git at videolan.org
Wed Aug 12 19:26:37 CEST 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Aug 9 16:32:43 2009 +0200| [d9f6b0dec075b94e982b0dc1cbe73d432be23a7a] | committer: Laurent Aimar
Set 'saved-volume" in aout_VolumeSet.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d9f6b0dec075b94e982b0dc1cbe73d432be23a7a
---
src/audio_output/intf.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index 8a8b4c7..e373298 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -98,19 +98,23 @@ int __aout_VolumeGet( vlc_object_t * p_object, audio_volume_t * pi_volume )
*****************************************************************************/
int __aout_VolumeSet( vlc_object_t * p_object, audio_volume_t i_volume )
{
- aout_instance_t *p_aout = vlc_object_find( p_object, VLC_OBJECT_AOUT, FIND_ANYWHERE );
- int i_result = 0;
-
config_PutInt( p_object, "volume", i_volume );
var_SetBool( p_object->p_libvlc, "volume-change", true );
- if ( p_aout == NULL ) return 0;
+ var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER );
+ var_SetInteger( p_object->p_libvlc, "saved-volume" , i_volume );
+ aout_instance_t *p_aout = vlc_object_find( p_object,
+ VLC_OBJECT_AOUT, FIND_ANYWHERE );
+ if ( p_aout == NULL )
+ return VLC_SUCCESS;
+
+ int i_result = VLC_SUCCESS;
aout_lock_mixer( p_aout );
+
if ( !p_aout->mixer.b_error )
- {
i_result = p_aout->output.pf_volume_set( p_aout, i_volume );
- }
+
aout_unlock_mixer( p_aout );
var_SetBool( p_aout, "intf-change", true );
More information about the vlc-devel
mailing list