~ubuntu-branches/ubuntu/vivid/aeolus/vivid

« back to all changes in this revision

Viewing changes to reverb.h

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2010-04-19 19:12:51 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100419191251-hgarjfcdfl7c0ryl
Tags: 0.8.4-3
debian/patches/01-makefile.patch: Drop -march=native flag, it isn't valid
for Debian packages as the results are unpredictable, thanks to
Bastian Blank for reporting this (Closes: #578278).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
    Copyright (C) 2003-2008 Fons Adriaensen <fons@kokkinizita.net>
3
 
    
4
 
    This program is free software; you can redistribute it and/or modify
5
 
    it under the terms of the GNU General Public License as published by
6
 
    the Free Software Foundation; either version 2 of the License, or
7
 
    (at your option) any later version.
8
 
 
9
 
    This program is distributed in the hope that it will be useful,
10
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
    GNU General Public License for more details.
13
 
 
14
 
    You should have received a copy of the GNU General Public License
15
 
    along with this program; if not, write to the Free Software
16
 
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17
 
*/
18
 
 
19
 
 
20
 
#ifndef __REVERB_H
21
 
#define __REVERB_H
22
 
 
23
 
 
24
 
class Delelm
25
 
{
26
 
private:
27
 
 
28
 
    friend class Reverb;
29
 
    
30
 
    void init (int size, float fb);
31
 
    void fini (void);
32
 
    void set_t60mf (float tmf);
33
 
    void set_t60lo (float tlo, float _wlo);
34
 
    void set_t60hi (float thi, float chi);
35
 
    void print (void);
36
 
    float process (float x);
37
 
 
38
 
    int        _i;
39
 
    int        _size;
40
 
    float     *_line;
41
 
    float      _fb;
42
 
    float      _gmf;
43
 
    float      _glo;
44
 
    float      _wlo;
45
 
    float      _whi;
46
 
    float      _slo;
47
 
    float      _shi;    
48
 
};
49
 
 
50
 
 
51
 
 
52
 
class Reverb
53
 
{
54
 
public:
55
 
    
56
 
    void init (float rate);
57
 
    void fini (void);
58
 
    void process (int n, float gain, float *R, float *W, float *X, float *Y, float *Z);
59
 
 
60
 
    void set_delay (float del);
61
 
    void set_t60mf (float tmf);
62
 
    void set_t60lo (float tlo, float flo);
63
 
    void set_t60hi (float thi, float fhi);
64
 
 
65
 
private:
66
 
 
67
 
    void print (void);
68
 
    float  *_line;
69
 
    int     _size;
70
 
    int     _idel;
71
 
    int     _i;
72
 
    Delelm  _delm [16];
73
 
    float   _rate;
74
 
    float   _gain;
75
 
    float   _tmf;
76
 
    float   _tlo;
77
 
    float   _thi;
78
 
    float   _flo;
79
 
    float   _fhi;
80
 
    float   _x0, _x1, _x2, _x3, _x4, _x5, _x6, _x7;
81
 
    float   _z;
82
 
 
83
 
    static int   _sizes [16];
84
 
    static float _feedb [16]; 
85
 
};
86
 
 
87
 
 
88
 
#endif