Audacious  $Id:Doxyfile42802007-03-2104:39:00Znenolod$
Defines | Functions | Variables
equalizer.c File Reference
#include <glib.h>
#include <math.h>
#include <string.h>
#include <libaudcore/hook.h>
#include "audconfig.h"
#include "equalizer.h"

Go to the source code of this file.

Defines

#define EQ_BANDS   AUD_EQUALIZER_NBANDS
#define MAX_CHANNELS   10
#define Q   1.2247449

Functions

static void bp2 (gfloat *a, gfloat *b, gfloat fc, gfloat q)
void eq_set_format (gint new_channels, gint new_rate)
static void eq_set_channel_bands (gint channel, gfloat *bands)
static void eq_set_bands (gfloat preamp, gfloat *bands)
void eq_filter (gfloat *data, gint samples)
static void eq_update (void *data, void *user_data)
void eq_init (void)

Variables

static const gfloat CF [EQ_BANDS]
static GStaticMutex mutex = G_STATIC_MUTEX_INIT
static gboolean active
static gint channels
static gint rate
static gfloat a [EQ_BANDS][2]
static gfloat b [EQ_BANDS][2]
static gfloat wqv [MAX_CHANNELS][EQ_BANDS][2]
static gfloat gv [MAX_CHANNELS][EQ_BANDS]
static gint K

Define Documentation

#define EQ_BANDS   AUD_EQUALIZER_NBANDS

Definition at line 23 of file equalizer.c.

Referenced by eq_set_format(), eq_set_channel_bands(), and eq_set_bands().

#define MAX_CHANNELS   10

Definition at line 24 of file equalizer.c.

Referenced by eq_set_bands().

#define Q   1.2247449

Definition at line 28 of file equalizer.c.

Referenced by eq_set_format().


Function Documentation

static void bp2 ( gfloat *  a,
gfloat *  b,
gfloat  fc,
gfloat  q 
) [static]

Definition at line 47 of file equalizer.c.

Referenced by eq_set_format().

void eq_filter ( gfloat *  data,
gint  samples 
)

Definition at line 103 of file equalizer.c.

Referenced by write_processed().

void eq_init ( void  )

Definition at line 159 of file equalizer.c.

Referenced by init_two().

static void eq_set_bands ( gfloat  preamp,
gfloat *  bands 
) [static]

Definition at line 91 of file equalizer.c.

Referenced by eq_update().

static void eq_set_channel_bands ( gint  channel,
gfloat *  bands 
) [static]

Definition at line 83 of file equalizer.c.

Referenced by eq_set_bands().

void eq_set_format ( gint  new_channels,
gint  new_rate 
)

Definition at line 58 of file equalizer.c.

Referenced by open_audio().

static void eq_update ( void *  data,
void *  user_data 
) [static]

Definition at line 149 of file equalizer.c.

Referenced by eq_init().


Variable Documentation

gfloat a[EQ_BANDS][2] [static]
gboolean active [static]

Definition at line 38 of file equalizer.c.

Referenced by eq_filter(), and eq_update().

gfloat b[EQ_BANDS][2] [static]
const gfloat CF[EQ_BANDS] [static]
Initial value:
 {31.25, 62.5, 125, 250, 500, 1000, 2000,
 4000, 8000, 16000}

Definition at line 34 of file equalizer.c.

Referenced by eq_set_format().

gint channels [static]
gfloat gv[MAX_CHANNELS][EQ_BANDS] [static]

Definition at line 43 of file equalizer.c.

Referenced by eq_set_channel_bands(), and eq_filter().

gint K [static]

Definition at line 44 of file equalizer.c.

Referenced by eq_set_format(), and eq_filter().

GStaticMutex mutex = G_STATIC_MUTEX_INIT [static]

Definition at line 37 of file equalizer.c.

Referenced by eq_set_format(), eq_filter(), and eq_update().

Definition at line 39 of file equalizer.c.

Referenced by effect_start(), effect_insert(), eq_set_format(), and open_audio().

gfloat wqv[MAX_CHANNELS][EQ_BANDS][2] [static]

Definition at line 42 of file equalizer.c.

Referenced by eq_set_format(), and eq_filter().