[vlc-devel] [PATCH] Add new API to libvlc for persistent equalizer settings.
Rémi Denis-Courmont
remi at remlab.net
Tue Aug 28 04:29:47 CEST 2012
Hello,
On Tuesday 28 August 2012, Alexey Sokolov wrote:
> > +/***********************************************************************
> > ****** + * libvlc_audio_equalizer_get_preset_name : Get the name for a
> > preset +
> > ************************************************************************
> > *****/ +const char *libvlc_audio_equalizer_get_preset_name( unsigned
> > u_index ) +{
> > + if ( u_index >= NB_PRESETS )
> > + return NULL;
>
> Please set an error message via libvlc_printerr( "..." ); when an error
> is detected.
That's not necessary. The function cannot fail with valid arguments. There is
no ambiguity as to why the result is NULL: the index was out of range.
An error would if the function failed inspite of valid input parameters.
> > +
> > + return preset_list_text[ u_index ];
> > +}
--
Rémi Denis-Courmont
http://www.remlab.info
More information about the vlc-devel
mailing list