]> git.sesse.net Git - vlc/blobdiff - modules/audio_filter/param_eq.c
Wait a little bit so we get the meta and art
[vlc] / modules / audio_filter / param_eq.c
index 57f1564a6f2175bca09baff1faf12199f0a19fce..89ff80e37ef029b80c14250315ec76e1620e9658 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * param_eq.c:
  *****************************************************************************
- * Copyright (C) 2006 the VideoLAN team
+ * Copyright © 2006 the VideoLAN team
  * $Id$
  *
  * Authors: Antti Huovilainen
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>
 #include <math.h>
 
 #include <vlc/vlc.h>
-
-#include <vlc/aout.h>
-#include "aout_internal.h"
+#include <vlc_aout.h>
 
 /*****************************************************************************
  * Module descriptor
@@ -41,43 +37,38 @@ static int  Open ( vlc_object_t * );
 static void Close( vlc_object_t * );
 static void CalcPeakEQCoeffs( float, float, float, float, float * );
 static void CalcShelfEQCoeffs( float, float, float, int, float, float * );
-static void ProcessEQ( float *, float *, float *, int, int, float *, int );
+static void ProcessEQ( float *, float *, float *, unsigned, unsigned, float *, unsigned );
 static void DoWork( aout_instance_t *, aout_filter_t *,
                     aout_buffer_t *, aout_buffer_t * );
 
 vlc_module_begin();
     set_description( _("Parametric Equalizer") );
-    set_shortname( N_("Parametric Equalizer" ) );
+    set_shortname( _("Parametric Equalizer" ) );
     set_capability( "audio filter", 0 );
     set_category( CAT_AUDIO );
     set_subcategory( SUBCAT_AUDIO_AFILTER );
 
-    add_float( "param-eq-lowf", 100, NULL, N_("Low freq (Hz)"),NULL, VLC_FALSE );
-    /// \bug Db -> dB
+    add_float( "param-eq-lowf", 100, NULL, N_("Low freq (Hz)"),"", VLC_FALSE );
     add_float_with_range( "param-eq-lowgain", 0, -20.0, 20.0, NULL,
-                          N_("Low freq gain (Db)"), NULL,VLC_FALSE );
-    add_float( "param-eq-highf", 10000, NULL, N_("High freq (Hz)"),NULL, VLC_FALSE );
-    /// \bug Db -> dB
+                          N_("Low freq gain (dB)"), "",VLC_FALSE );
+    add_float( "param-eq-highf", 10000, NULL, N_("High freq (Hz)"),"", VLC_FALSE );
     add_float_with_range( "param-eq-highgain", 0, -20.0, 20.0, NULL,
-                          N_("High freq gain (Db)"), NULL,VLC_FALSE );
-    add_float( "param-eq-f1", 300, NULL, N_("Freq 1 (Hz)"),NULL, VLC_FALSE );
-    /// \bug Db -> dB
+                          N_("High freq gain (dB)"),"",VLC_FALSE );
+    add_float( "param-eq-f1", 300, NULL, N_("Freq 1 (Hz)"),"", VLC_FALSE );
     add_float_with_range( "param-eq-gain1", 0, -20.0, 20.0, NULL,
-                          N_("Freq 1 gain (Db)"), NULL,VLC_FALSE );
+                          N_("Freq 1 gain (dB)"), "",VLC_FALSE );
     add_float_with_range( "param-eq-q1", 3, 0.1, 100.0, NULL,
-                          N_("Freq 1 Q"), NULL,VLC_FALSE );
-    add_float( "param-eq-f2", 1000, NULL, N_("Freq 2 (Hz)"),NULL, VLC_FALSE );
-    /// \bug Db -> dB
+                          N_("Freq 1 Q"), "",VLC_FALSE );
+    add_float( "param-eq-f2", 1000, NULL, N_("Freq 2 (Hz)"),"", VLC_FALSE );
     add_float_with_range( "param-eq-gain2", 0, -20.0, 20.0, NULL,
-                          N_("Freq 2 gain (Db)"), NULL,VLC_FALSE );
+                          N_("Freq 2 gain (dB)"),"",VLC_FALSE );
     add_float_with_range( "param-eq-q2", 3, 0.1, 100.0, NULL,
-                          N_("Freq 2 Q"), NULL,VLC_FALSE );
-    add_float( "param-eq-f3", 3000, NULL, N_("Freq 3 (Hz)"),NULL, VLC_FALSE );
-    /// \bug Db -> dB
+                          N_("Freq 2 Q"),"",VLC_FALSE );
+    add_float( "param-eq-f3", 3000, NULL, N_("Freq 3 (Hz)"),"", VLC_FALSE );
     add_float_with_range( "param-eq-gain3", 0, -20.0, 20.0, NULL,
-                          N_("Freq 3 gain (Db)"), NULL,VLC_FALSE );
+                          N_("Freq 3 gain (dB)"),"",VLC_FALSE );
     add_float_with_range( "param-eq-q3", 3, 0.1, 100.0, NULL,
-                          N_("Freq 3 Q"), NULL,VLC_FALSE );
+                          N_("Freq 3 Q"),"",VLC_FALSE );
 
     set_callbacks( Open, Close );
 vlc_module_end();
@@ -308,10 +299,10 @@ static void CalcShelfEQCoeffs( float f0, float slope, float gainDB, int high,
   size of coeffs is 5*eqCount
 */
 void ProcessEQ( float *src, float *dest, float *state, 
-                int channels, int samples, float *coeffs, 
-                int eqCount )
+                unsigned channels, unsigned samples, float *coeffs, 
+                unsigned eqCount )
 {
-    int i, chn, eq;
+    unsigned i, chn, eq;
     float   b0, b1, b2, a1, a2;
     float   x, y = 0;
     float   *src1, *dest1;