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

Pierre d'Herbemont pdherbemont at gmail.com
Tue Jul 28 18:42:22 CEST 2009

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.
	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
is called.

I would say:
Which could be equivalent to:

to disable it from a specified instance.

> 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.


More information about the vlc-devel mailing list