]> git.sesse.net Git - vlc/commitdiff
aout_MuteGet: fix name and add VLC_OBJECT() magic cast
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 2 Jul 2012 14:51:43 +0000 (17:51 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 3 Jul 2012 15:04:08 +0000 (18:04 +0300)
include/vlc_aout_intf.h
lib/audio.c
modules/control/hotkeys.c
modules/gui/macosx/CoreInteraction.m
modules/gui/qt4/components/controller_widget.cpp
modules/gui/skins2/src/vlcproc.cpp
src/audio_output/intf.c
src/libvlccore.sym

index e889ef1d263244e3b0b915090974f868e04d2c90..dd2354194742c3e3596cf5bed1a3c3043e1a65ee 100644 (file)
@@ -40,7 +40,8 @@ VLC_API int aout_MuteToggle( vlc_object_t * );
 #define aout_MuteToggle(a) aout_MuteToggle(VLC_OBJECT(a))
 VLC_API int aout_MuteSet( vlc_object_t *, bool );
 #define aout_MuteSet(a, b) aout_MuteSet(VLC_OBJECT(a), b)
-VLC_API bool aout_IsMuted( vlc_object_t * );
+VLC_API int aout_MuteGet( vlc_object_t * );
+#define aout_MuteGet(a) aout_MuteGet(VLC_OBJECT(a))
 
 VLC_API void aout_EnableFilter( vlc_object_t *, const char *, bool );
 #define aout_EnableFilter( o, n, b ) \
index 91e96b12cc136b54795777da9a7045250ad0b769..a26733ead28c8525332288046fcdc1bd73e45f24 100644 (file)
@@ -318,7 +318,7 @@ void libvlc_audio_toggle_mute( libvlc_media_player_t *mp )
 
 int libvlc_audio_get_mute( libvlc_media_player_t *mp )
 {
-    return aout_IsMuted( VLC_OBJECT(mp) );
+    return aout_MuteGet( mp );
 }
 
 void libvlc_audio_set_mute( libvlc_media_player_t *mp, int mute )
index d7e1eee6b4152256c3ec5cbc68f6559e0f9d9433..868d5230b046d9abf691ce205b72c470076ae722 100644 (file)
@@ -203,7 +203,7 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
         case ACTIONID_VOL_MUTE:
             if( aout_MuteToggle( p_playlist ) == 0 && p_vout != NULL )
             {
-                if( aout_IsMuted( VLC_OBJECT(p_playlist) ) )
+                if( aout_MuteGet( p_playlist ) > 0 )
                 {
                     ClearChannels( p_intf, p_vout );
                     DisplayIcon( p_vout, OSD_MUTE_ICON );
index 0602a6f3eed17ab11ac5880726818947ec732e75..c9144bf8869c209099890f57354e7a8d08358ada 100644 (file)
@@ -504,7 +504,7 @@ static VLCCoreInteraction *_o_sharedInstance = nil;
         return NO;
 
     BOOL b_is_muted = NO;
-    b_is_muted = aout_IsMuted( VLC_OBJECT(pl_Get( p_intf )) );
+    b_is_muted = aout_MuteGet( pl_Get( p_intf ) ) > 0;
 
     return b_is_muted;
 }
index 25163cdc101d66bcb47debc776ab335154c118ea..f0df35353793f73cd40be3ea2c0235a845bd532f 100644 (file)
@@ -185,7 +185,7 @@ void SoundWidget::valueChangedFilter( int i_val )
 void SoundWidget::updateMuteStatus()
 {
     playlist_t *p_playlist = pl_Get( p_intf );
-    b_is_muted = aout_IsMuted( VLC_OBJECT(p_playlist) );
+    b_is_muted = aout_MuteGet( p_playlist ) > 0;
 
     SoundSlider *soundSlider = qobject_cast<SoundSlider *>(volumeSlider);
     if( soundSlider )
index 9c15e8877e7a5b534f3c7c6593672d44889e3f71..119b095773dc3f7ea65d69cf660b9e2cb4101bd6 100644 (file)
@@ -695,7 +695,7 @@ void VlcProc::on_volume_changed( vlc_object_t* p_obj, vlc_value_t newVal )
 
     audio_volume_t volume = aout_VolumeGet( pPlaylist );
     SET_VOLUME( m_cVarVolume, volume, false );
-    bool b_is_muted = aout_IsMuted( VLC_OBJECT(pPlaylist) );
+    bool b_is_muted = aout_MuteGet( pPlaylist ) > 0;
     SET_BOOL( m_cVarMute, b_is_muted );
 }
 
@@ -800,7 +800,7 @@ void VlcProc::init_variables()
 
     audio_volume_t volume = aout_VolumeGet( pPlaylist );
     SET_VOLUME( m_cVarVolume, volume, false );
-    bool b_is_muted = aout_IsMuted( VLC_OBJECT(pPlaylist) );
+    bool b_is_muted = aout_MuteGet( pPlaylist ) > 0;
     SET_BOOL( m_cVarMute, b_is_muted );
 
     update_equalizer();
index 1182ea6ff8ee93b70c19de0ce3b174db5ae468f6..044618e00fb1c65d3672903fd96991856b0d4a63 100644 (file)
@@ -195,10 +195,12 @@ int aout_MuteToggle (vlc_object_t *obj)
     return commitVolume (obj, aout, vol, mute);
 }
 
+#undef aout_MuteGet
 /**
  * Gets the output mute status.
+ * \return 0 if not muted, 1 if muted, -1 if undefined.
  */
-bool aout_IsMuted (vlc_object_t *obj)
+int aout_MuteGet (vlc_object_t *obj)
 {
     audio_output_t *aout;
     bool mute;
index 45c8494dbc91633425a8e0990ac1e55e2bad4fb3..60c4ebd7097cd41c367ac9b5a042faa1989f84a6 100644 (file)
@@ -19,7 +19,7 @@ aout_VolumeSet
 aout_VolumeUp
 aout_MuteToggle
 aout_MuteSet
-aout_IsMuted
+aout_MuteGet
 aout_VolumeSoftInit
 aout_VolumeHardInit
 block_Alloc