Changeset 5bd77e4ba780501cd46ad76c62919681a47984b4

Show
Ignore:
Timestamp:
06/11/06 13:57:05 (2 years ago)
Author:
Gildas Bazin <gbazin@videolan.org>
git-committer:
Gildas Bazin <gbazin@videolan.org> 1150027025 +0000
git-parent:

[af23abe4b8908ee9067b412fce5b93918e8750b1]

git-author:
Gildas Bazin <gbazin@videolan.org> 1150027025 +0000
Message:

* src/audio_output/intf.c: optimise aout_VolumeGet a bit.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/audio_output/intf.c

    r470b47f r5bd77e4  
    6262int __aout_VolumeGet( vlc_object_t * p_object, audio_volume_t * pi_volume ) 
    6363{ 
    64     int i_volume, i_result = 0; 
     64    int i_result = 0; 
    6565    aout_instance_t * p_aout = vlc_object_find( p_object, VLC_OBJECT_AOUT, 
    6666                                                FIND_ANYWHERE ); 
    6767 
    68     i_volume = config_GetInt( p_object, "volume" ); 
    69     if ( pi_volume != NULL ) *pi_volume = (audio_volume_t)i_volume; 
    70  
    71     if ( p_aout == NULL ) return 0; 
     68    if ( pi_volume == NULL ) return -1; 
     69 
     70    if ( p_aout == NULL ) 
     71    { 
     72        *pi_volume = (audio_volume_t)config_GetInt( p_object, "volume" ); 
     73        return 0; 
     74    } 
    7275 
    7376    vlc_mutex_lock( &p_aout->mixer_lock ); 
     
    7578    { 
    7679        i_result = p_aout->output.pf_volume_get( p_aout, pi_volume ); 
     80    } 
     81    else 
     82    { 
     83        *pi_volume = (audio_volume_t)config_GetInt( p_object, "volume" ); 
    7784    } 
    7885    vlc_mutex_unlock( &p_aout->mixer_lock );