[vlc-devel] Fwd: [PATCH] libvlc: equalizer: Use ISO bands instead of VLC bands

Ron Wright logiconcepts819 at gmail.com
Mon Mar 17 18:40:21 CET 2014


On Mon, Mar 17, 2014 at 12:14 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le dimanche 16 mars 2014, 01:20:35 Ronald Wright a écrit :
>> This eliminates the inconsistency between the equalizer bands that are
>> portrayed by the API and the bands that are actually used by the equalizer
>> module.
>> ---
>>  lib/media_player.c        | 2 ++
>>  src/audio_output/output.c | 1 +
>>  2 files changed, 3 insertions(+)
>>
>> diff --git a/lib/media_player.c b/lib/media_player.c
>> index 7df46f4..614ce94 100644
>> --- a/lib/media_player.c
>> +++ b/lib/media_player.c
>> @@ -1502,12 +1502,14 @@ int libvlc_media_player_set_equalizer(
>> libvlc_media_player_t *p_mi, libvlc_equal }
>>
>>      var_SetFloat( p_mi, "equalizer-preamp", f_preamp );
>> +    var_SetBool( p_mi, "equalizer-vlcfreqs", false );
>>      var_SetString( p_mi, "equalizer-bands", psz_bands );
>>
>>      audio_output_t *p_aout = input_resource_HoldAout(
>> p_mi->input.p_resource ); if ( p_aout )
>>      {
>>          var_SetFloat( p_aout, "equalizer-preamp", f_preamp );
>> +        var_SetBool( p_aout, "equalizer-vlcfreqs", false );
>>          var_SetString( p_aout, "equalizer-bands", psz_bands );
>>
>>          vlc_object_release( p_aout );
>> diff --git a/src/audio_output/output.c b/src/audio_output/output.c
>> index 86a9506..64104b9 100644
>> --- a/src/audio_output/output.c
>> +++ b/src/audio_output/output.c
>> @@ -307,6 +307,7 @@ audio_output_t *aout_New (vlc_object_t *parent)
>>          }
>>
>>      var_Create (aout, "equalizer-preamp", VLC_VAR_FLOAT |
>> VLC_VAR_DOINHERIT);
>> +    var_Create (aout, "equalizer-vlcfreqs",
>> VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
>
> I think you can remove DOINHERIT and the var_SetBool() calls to the same
> effects.
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
>

The VLC_VAR_DOINHERIT flags were already in place by the previous
author, but if you want me to remove those flags from all the function
calls, then that would be fine by me.

JB clearly wants LibVLC to use ISO bands, even though he seemed to be
interested in keeping VLC bands as the default setting in
modules/audio_codec/equalizer.c.  This means removing the
var_SetBool() call will actually make LibVLC use the default VLC bands
for the audio effect instead of the ISO bands because VLC bands remain
the default in modules/audio_codec/equalizer.c.  Therefore, it will
leave us with the same inconsistency again.  I apologize if I am
misunderstanding something here.

Regards,

Ron Wright



More information about the vlc-devel mailing list