~ubuntu-branches/ubuntu/lucid/mpg123/lucid

« back to all changes in this revision

Viewing changes to src/equalizer.c

Tags: upstream-0.60
ImportĀ upstreamĀ versionĀ 0.60

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
        equalizer.c: equalizer settings
 
3
 
 
4
        copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
 
5
        see COPYING and AUTHORS files in distribution or http://mpg123.de
 
6
        initially written by Michael Hipp
 
7
*/
 
8
 
 
9
 
 
10
#include "config.h"
 
11
#include "mpg123.h"
 
12
 
 
13
real equalizer[2][32];
 
14
real equalizer_sum[2][32];
 
15
int equalizer_cnt;
 
16
 
 
17
real equalizerband[2][SBLIMIT*SSLIMIT];
 
18
 
 
19
void do_equalizer(real *bandPtr,int channel) 
 
20
{
 
21
        int i;
 
22
 
 
23
        if(have_eq_settings) {
 
24
                for(i=0;i<32;i++)
 
25
                        bandPtr[i] = REAL_MUL(bandPtr[i], equalizer[channel][i]);
 
26
        }
 
27
 
 
28
/*      if(param.equalizer & 0x2) {
 
29
                
 
30
                for(i=0;i<32;i++)
 
31
                        equalizer_sum[channel][i] += bandPtr[i];
 
32
        }
 
33
*/
 
34
}
 
35
 
 
36
void do_equalizerband(real *bandPtr,int channel)
 
37
{
 
38
  int i;
 
39
  for(i=0;i<576;i++) {
 
40
    bandPtr[i] = REAL_MUL(bandPtr[i], equalizerband[channel][i]);
 
41
  }
 
42
}
 
43