[vlc-devel] [PATCH 3/6] equalizer: Add support for extra sets of ISO bands

Rémi Denis-Courmont remi at remlab.net
Thu Jul 24 19:35:28 CEST 2014


Le jeudi 24 juillet 2014, 12:19:19 Ronald Wright a écrit :
> Note:  This patch cannot be applied without patch 2, and patches 3 through 6
> must be applied all together.
> ---
>  modules/audio_filter/equalizer.c         | 233 ++++++++--
>  modules/audio_filter/equalizer_presets.h | 751
> +++++++++++++++++++++++++++++-- 2 files changed, 903 insertions(+), 81
> deletions(-)
> 
> diff --git a/modules/audio_filter/equalizer.c
> b/modules/audio_filter/equalizer.c index 98a4a7e..f45ba8b 100644
> --- a/modules/audio_filter/equalizer.c
> +++ b/modules/audio_filter/equalizer.c
> @@ -1,7 +1,7 @@
>  /**************************************************************************
> *** * equalizer.c:
>  
> ***************************************************************************
> ** - * Copyright (C) 2004-2012 VLC authors and VideoLAN
> + * Copyright (C) 2004-2012, 2014 VLC authors and VideoLAN
>   * $Id$
>   *
>   * Authors: Laurent Aimar <fenrir at via.ecp.fr>
> @@ -34,16 +34,16 @@
>  #include <vlc_common.h>
>  #include <vlc_plugin.h>
>  #include <vlc_charset.h>
> +#include <vlc_interpolation.h>
> 
>  #include <vlc_aout.h>
>  #include <vlc_filter.h>
> 
> +#define EQZ_INCLUDE_MATH_ROUTINES 1
>  #include "equalizer_presets.h"
> 
>  /* TODO:
>   *  - optimize a bit (you can hardly do slower ;)
> - *  - add tables for more bands (15 and 32 would be cool), maybe with auto
> coeffs - *    computation (not too hard once the Q is found).
>   *  - support for external preset
>   *  - callback to handle preset changes on the fly
>   *  - ...
> @@ -60,14 +60,29 @@ static void Close( vlc_object_t * );
> 
>  #define BANDS_TEXT N_( "Bands gain")
>  #define BANDS_LONGTEXT N_( \
> -         "Don't use presets, but manually specified bands. You need to " \
> -         "provide 10 values between -20dB and 20dB, separated by spaces, "
> \ -         "e.g. \"0 2 4 2 0 -2 -4 -2 0 2\"." )
> -
> -#define VLC_BANDS_TEXT N_( "Use VLC frequency bands" )
> -#define VLC_BANDS_LONGTEXT N_( \
> -         "Use the VLC frequency bands. Otherwise, use the ISO Standard " \
> -         "frequency bands." )
> +         "Don't use presets, but manually specified bands. You need to "   
>   \ +         "provide 10, 15, or 31 values between -20dB and 20dB,
> separated by " \ +         "spaces. You may optionally append a parameter
> \"v\" or \"i\" to "   \ +         "help VLC differentiate between VLC bands
> and ISO bands, "           \ +         "respectively. The \"v\" parameter
> is valid for 10 values only, "    \ +         "and the \"i\" parameter is
> valid for 10, 15 and 31 values. "        \ +         "Without this
> parameter specified, or with an invalid parameter, "   \ +         "the
> default is to assume VLC bands if there are 10 values or "      \ +        
> "ISO bands if there are 15 or 31 values.\n\nThe band values are "    \ +   
>      "interpolated if the number of bands is valid (i.e. 10, 15, or "     \
> +         "31), and the type of equalization suggested by the specified "  
>    \ +         "string differs from the current equalizer type (e.g. 10 VLC
> bands " \ +         "vs. a 10-band ISO equalizer or 15 ISO bands vs. a
> 31-band ISO "     \ +         "equalizer). Otherwise, each value is mapped
> to the corresponding "  \ +         "band of the current equalizer type,
> starting at the lowest band, "  \ +         "until there are no more spaces
> or values left.\n\nExamples: \"0 2 " \ +         "4 2 0 -2 -4 -2 0 2 v\"
> represent 10 VLC bands, and \"0 2 4 2 0 -2 " \ +         "-4 -2 0 2 4 2 0
> -2 -4\" represent 15 ISO bands." )

I fear this is just way too long for the UI.


-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list