1 /*
2 	reverb.h
3 
4 	Midi Wavetable Processing library
5 
6     Copyright (C) Chris Ison 2001-2011
7     Copyright (C) Bret Curtis 2013-2014
8 
9     This file is part of WildMIDI.
10 
11     WildMIDI is free software: you can redistribute and/or modify the player
12     under the terms of the GNU General Public License and you can redistribute
13     and/or modify the library under the terms of the GNU Lesser General Public
14     License as published by the Free Software Foundation, either version 3 of
15     the licenses, or(at your option) any later version.
16 
17     WildMIDI is distributed in the hope that it will be useful, but WITHOUT
18     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19     FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License and
20     the GNU Lesser General Public License for more details.
21 
22     You should have received a copy of the GNU General Public License and the
23     GNU Lesser General Public License along with WildMIDI.  If not,  see
24     <http://www.gnu.org/licenses/>.
25 */
26 
27 #ifndef __REVERB_H
28 #define __REVERB_H
29 
30 struct _rvb {
31 	/* filter data */
32 	signed int l_buf_flt_in[8][6][2];
33 	signed int l_buf_flt_out[8][6][2];
34 	signed int r_buf_flt_in[8][6][2];
35 	signed int r_buf_flt_out[8][6][2];
36 	signed int coeff[8][6][5];
37 	/* buffer data */
38 	signed int *l_buf;
39 	signed int *r_buf;
40 	int l_buf_size;
41 	int r_buf_size;
42 	int l_out;
43 	int r_out;
44 	int l_sp_in[8];
45 	int r_sp_in[8];
46 	int l_in[4];
47 	int r_in[4];
48 	int gain;
49 	unsigned long int max_reverb_time;
50 };
51 
52  extern void _WM_reset_reverb (struct _rvb *rvb);
53  extern struct _rvb *_WM_init_reverb(int rate, float room_x, float room_y, float listen_x, float listen_y);
54  extern void _WM_free_reverb (struct _rvb *rvb);
55  extern void _WM_do_reverb (struct _rvb *rvb, signed int *buffer, int size);
56 
57 #endif /* __REVERB_H */
58