/*****************************************************************************
* Local prototypes
*****************************************************************************/
-
+#define EQZ_BANDS_MAX 10
typedef struct aout_filter_sys_t
{
/* Filter static config */
float f_alpha;
float f_beta;
float f_gamma;
- } band[0];
+ } band[EQZ_BANDS_MAX];
} eqz_config_t;
char *psz_name;
int i_band;
float f_preamp;
- float f_amp[0];
+ float f_amp[EQZ_BANDS_MAX];
} eqz_preset_t;
static const eqz_preset_t eqz_preset_flat_10b=
/* Register preset bands (for intf) if : */
/* We have no bands info --> the preset info must be given to the intf */
/* or The bands info matches the preset */
+ if (p_sys->psz_newbands == NULL)
+ {
+ msg_Err(p_filter, "No preset selected");
+ return (VLC_EGENERIC);
+ }
if( ( *(val2.psz_string) &&
strstr( p_sys->psz_newbands, val2.psz_string ) ) || !*val2.psz_string )
{
p_sys->f_amp[i] = EqzConvertdB( f );
if( !*p ) break; /* end of line */
- p++;
+ p=p_next+1;
}
}