[vlc-devel] libvlc API: Add equalizer to audio.c

Cyril MATHE cmathe at actech-innovation.com
Wed Jul 29 10:28:12 CEST 2009


Le mardi 28 juillet 2009 à 09:42 -0700, Pierre d'Herbemont a écrit :
> On Jul 31, 2009, at 5:38 AM, Cyril MATHE wrote:
> 
> > libvlc_audio_equalizer_t
> > {
> > libvlc_instance_t p_instance;
> > float f_preamp;
> > float f_band[BAND_NUMBER]
> > int i_band;
> > bool b_enable;
> > }
> 
> This should not be part of the API, this structure has to be opaque.
> 
> > libvlc_audio_equalizer_t * libvlc_audio_equalizer_new(p_instance)
> 
> > void libvlc_audio_equalizer_set_preset( libvlc_audio_equalizer*, int
> > i_presetID)
> 
> I would prefer to have the equalizer to be create as a copy of a preset.
> ie
> 	equalizer = equalizer_new_from_preset_name("jazz", instance);
> 	equalizer_set_amplification_at_index(equalizer, 0.1, 0);
> 	media_player_set_equalizer(media_player, equalizer);
> 
> 	// You are now using a modified version of the "jazz" equalizer when  
> playing audio in the media_player instance.
> 
> >
> > bool libvlc_audio_equalizer_get_enable(libvlc_audio_equalizer*)
> > void libvlc_audio_equalizer_set_enable(libvlc_audio_equalizer*, bool
> > b_enable)
> 
> This shouldn't be needed. The equalizer should be enabled as soon as
> media_player_set_equalizer(equlizer);
> is called.
> 
> I would say:
> 	media_player_set_equalizer(NULL);
> Which could be equivalent to:
> 	media_player_set_equalizer(Libvlc_DisabledEqualizer);
> 
> to disable it from a specified instance.
OK but what about if we want to get equalizer status ?
> 
> >
> > void libvlc_media_player_get_equalizer(libvlc_audio_equalizer*)
> >
> > void libvlc_media_player_set_equalizer(libvlc_audio_equalizer*)
> 
> You need to take a libvlc_media_player_t as the first parameter.
> 
> Pierre.
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
> 




More information about the vlc-devel mailing list