Add/remove source(s) in our MSVC project (libardour)
[ardour.git] / libs / fluidsynth / src / fluid_rev.h
1 /* FluidSynth - A Software Synthesizer
2  *
3  * Copyright (C) 2003  Peter Hanappe and others.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public License
7  * as published by the Free Software Foundation; either version 2.1 of
8  * the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free
17  * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  * 02110-1301, USA
19  */
20
21
22 #ifndef _FLUID_REV_H
23 #define _FLUID_REV_H
24
25 #include "fluidsynth_priv.h"
26
27 typedef struct _fluid_revmodel_t fluid_revmodel_t;
28
29
30 /** Flags for fluid_revmodel_set() */
31 typedef enum
32 {
33     FLUID_REVMODEL_SET_ROOMSIZE       = 1 << 0,
34     FLUID_REVMODEL_SET_DAMPING        = 1 << 1,
35     FLUID_REVMODEL_SET_WIDTH          = 1 << 2,
36     FLUID_REVMODEL_SET_LEVEL          = 1 << 3,
37
38     /** Value for fluid_revmodel_set() which sets all reverb parameters. */
39     FLUID_REVMODEL_SET_ALL            =   FLUID_REVMODEL_SET_LEVEL
40                                           | FLUID_REVMODEL_SET_WIDTH
41                                           | FLUID_REVMODEL_SET_DAMPING
42                                           | FLUID_REVMODEL_SET_ROOMSIZE,
43 } fluid_revmodel_set_t;
44
45 /*
46  * reverb preset
47  */
48 typedef struct _fluid_revmodel_presets_t
49 {
50     const char *name;
51     fluid_real_t roomsize;
52     fluid_real_t damp;
53     fluid_real_t width;
54     fluid_real_t level;
55 } fluid_revmodel_presets_t;
56
57
58 /*
59  * reverb
60  */
61 fluid_revmodel_t *new_fluid_revmodel(fluid_real_t sample_rate);
62 void delete_fluid_revmodel(fluid_revmodel_t *rev);
63
64 void fluid_revmodel_processmix(fluid_revmodel_t *rev, fluid_real_t *in,
65                                fluid_real_t *left_out, fluid_real_t *right_out);
66
67 void fluid_revmodel_processreplace(fluid_revmodel_t *rev, fluid_real_t *in,
68                                    fluid_real_t *left_out, fluid_real_t *right_out);
69
70 void fluid_revmodel_reset(fluid_revmodel_t *rev);
71
72 void fluid_revmodel_set(fluid_revmodel_t *rev, int set, fluid_real_t roomsize,
73                         fluid_real_t damping, fluid_real_t width, fluid_real_t level);
74
75 void fluid_revmodel_samplerate_change(fluid_revmodel_t *rev, fluid_real_t sample_rate);
76
77 #endif /* _FLUID_REV_H */