Credit Andrew - fix vorbis audio which was scratchy and ensure aging plugin does...
[goodguy/cinelerra.git] / cinelerra-5.1 / plugins / reverb / reverbwindow.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008-2019 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef REVERBWINDOW_H
22 #define REVERBWINDOW_H
23
24 #define TOTAL_PARAMS 9
25
26 class ReverbWindow;
27 class ReverbParam;
28
29 #include "eqcanvas.inc"
30 #include "guicast.h"
31 #include "mutex.h"
32 #include "pluginclient.h"
33 #include "reverb.inc"
34
35
36 class ReverbLevelInit;
37 class ReverbDelayInit;
38 class ReverbRefLevel1;
39 class ReverbRefLevel2;
40 class ReverbRefTotal;
41 class ReverbRefLength;
42 class ReverbHigh;
43 class ReverbLow;
44 class ReverbQ;
45 class ReverbSize;
46
47 class ReverbWindow : public PluginClientWindow
48 {
49 public:
50         ReverbWindow(Reverb *reverb);
51         ~ReverbWindow();
52
53         void create_objects();
54         void update();
55         void update_canvas();
56
57         Reverb *reverb;
58
59         ReverbParam *params[TOTAL_PARAMS];
60
61         ReverbParam *level_init;
62         ReverbParam *delay_init;
63         ReverbParam *ref_level1;
64         ReverbParam *ref_level2;
65         ReverbParam *ref_total;
66         ReverbParam *ref_length;
67         ReverbParam *high;
68         ReverbParam *low;
69         ReverbParam *q;
70         EQCanvas *canvas;
71         ReverbSize *size;
72 };
73
74 class ReverbSize : public BC_PopupMenu
75 {
76 public:
77         ReverbSize(ReverbWindow *window, Reverb *plugin, int x, int y);
78
79         int handle_event();
80         void create_objects();           // add initial items
81         void update(int size);
82
83         ReverbWindow *window;
84         Reverb *plugin;
85 };
86
87
88 class ReverbFPot : public BC_FPot
89 {
90 public:
91         ReverbFPot(ReverbParam *param, int x, int y);
92         int handle_event();
93         ReverbParam *param;
94 };
95
96 class ReverbIPot : public BC_IPot
97 {
98 public:
99         ReverbIPot(ReverbParam *param, int x, int y);
100         int handle_event();
101         ReverbParam *param;
102 };
103
104 class ReverbQPot : public BC_QPot
105 {
106 public:
107         ReverbQPot(ReverbParam *param, int x, int y);
108         int handle_event();
109         ReverbParam *param;
110 };
111
112 class ReverbText : public BC_TextBox
113 {
114 public:
115         ReverbText(ReverbParam *param, int x, int y, int w, int value);
116         ReverbText(ReverbParam *param, int x, int y, int w, float value);
117         int handle_event();
118         ReverbParam *param;
119 };
120
121 class ReverbParam
122 {
123 public:
124         ReverbParam(Reverb *reverb, ReverbWindow *gui,
125                 int x, int x2, int x3, int y, int text_w,
126                 int *output_i,
127                 float *output_f, // floating point output
128                 int *output_q, // frequency output
129                 const char *title, float min, float max);
130         ~ReverbParam();
131
132         void initialize();
133         void update(int skip_text, int skip_pot);
134
135         float *output_f;
136         ReverbFPot *fpot;
137         int *output_i;
138         ReverbIPot *ipot;
139         int *output_q;
140         ReverbQPot *qpot;
141
142         char *title;
143         ReverbText *text;
144         ReverbWindow *gui;
145         Reverb *reverb;
146         int x, y;
147         int x2, x3, text_w;
148         float min, max;
149 };
150
151
152 class ReverbLevelInit : public BC_FPot
153 {
154 public:
155         ReverbLevelInit(Reverb *reverb, int x, int y);
156         ~ReverbLevelInit();
157         int handle_event();
158         Reverb *reverb;
159 };
160
161 class ReverbDelayInit : public BC_IPot
162 {
163 public:
164         ReverbDelayInit(Reverb *reverb, int x, int y);
165         ~ReverbDelayInit();
166         int handle_event();
167         Reverb *reverb;
168 };
169
170 class ReverbRefLevel1 : public BC_FPot
171 {
172 public:
173         ReverbRefLevel1(Reverb *reverb, int x, int y);
174         ~ReverbRefLevel1();
175         int handle_event();
176         Reverb *reverb;
177 };
178
179 class ReverbRefLevel2 : public BC_FPot
180 {
181 public:
182         ReverbRefLevel2(Reverb *reverb, int x, int y);
183         ~ReverbRefLevel2();
184         int handle_event();
185         Reverb *reverb;
186 };
187
188 class ReverbRefTotal : public BC_IPot
189 {
190 public:
191         ReverbRefTotal(Reverb *reverb, int x, int y);
192         ~ReverbRefTotal();
193         int handle_event();
194         Reverb *reverb;
195 };
196
197 class ReverbRefLength : public BC_IPot
198 {
199 public:
200         ReverbRefLength(Reverb *reverb, int x, int y);
201         ~ReverbRefLength();
202         int handle_event();
203         Reverb *reverb;
204 };
205
206 class ReverbHigh : public BC_QPot
207 {
208 public:
209         ReverbHigh(Reverb *reverb, int x, int y);
210         ~ReverbHigh();
211         int handle_event();
212         Reverb *reverb;
213 };
214
215 class ReverbLow : public BC_QPot
216 {
217 public:
218         ReverbLow(Reverb *reverb, int x, int y);
219         ~ReverbLow();
220         int handle_event();
221         Reverb *reverb;
222 };
223
224 class ReverbQ: public BC_QPot
225 {
226 public:
227         ReverbQ(Reverb *reverb, int x, int y);
228         ~ReverbQ();
229         int handle_event();
230         Reverb *reverb;
231 };
232
233 #endif