Commit cb96c1cd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

RC (old): remove useless check for AOUT_VOLUME_MAX

parent 87481072
...@@ -1496,20 +1496,12 @@ static int Volume( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1496,20 +1496,12 @@ static int Volume( vlc_object_t *p_this, char const *psz_cmd,
{ {
/* Set. */ /* Set. */
audio_volume_t i_volume = atoi( newval.psz_string ); audio_volume_t i_volume = atoi( newval.psz_string );
if ( (i_volume > (audio_volume_t)AOUT_VOLUME_MAX) ) if( i_volume == 0 )
{ aout_ToggleMute( p_playlist, NULL );
msg_rc( "Volume must be in the range 0-%d.", AOUT_VOLUME_MAX ); if( !aout_VolumeSet( p_playlist, i_volume ) )
i_error = VLC_EBADVAR; i_error = VLC_SUCCESS;
} osd_Volume( p_this );
else msg_rc( STATUS_CHANGE "( audio volume: %d )", i_volume );
{
if( i_volume == 0 )
aout_ToggleMute( p_playlist, NULL );
if( !aout_VolumeSet( p_playlist, i_volume ) )
i_error = VLC_SUCCESS;
osd_Volume( p_this );
msg_rc( STATUS_CHANGE "( audio volume: %d )", i_volume );
}
} }
else else
{ {
......
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