source: golgotha/src/i4/loaders/mp3/equalizer.cc @ 80

Last change on this file since 80 was 80, checked in by Sam Hocevar, 11 years ago
  • Adding the Golgotha source code. Not sure what's going to be interesting in there, but since it's all public domain, there's certainly stuff to pick up.
File size: 880 bytes
Line 
1/********************************************************************** <BR>
2  This file is part of Crack dot Com's free source code release of
3  Golgotha. <a href="http://www.crack.com/golgotha_release"> <BR> for
4  information about compiling & licensing issues visit this URL</a>
5  <PRE> If that doesn't help, contact Jonathan Clark at
6  golgotha_source@usa.net (Subject should have "GOLG" in it)
7***********************************************************************/
8
9
10#include "loaders/mp3/mpg123.hh"
11
12real equalizer[2][32];
13real equalizer_sum[2][32];
14int equalizer_cnt;
15
16void do_equalizer(real *bandPtr,int channel)
17{
18        int i;
19
20        if(flags.equalizer & 0x1) {
21                for(i=0;i<32;i++)
22                        bandPtr[i] *= equalizer[channel][i];
23        }
24
25        if(flags.equalizer & 0x2) {
26                equalizer_cnt++;
27                for(i=0;i<32;i++)
28                        equalizer_sum[channel][i] += bandPtr[i];
29        }
30}
31
Note: See TracBrowser for help on using the repository browser.