4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
30 #include "pluginaclient.h"
39 class DBXSize : public BC_TextBox
42 DBXSize(DBXEffect *plugin, int x, int y);
48 class DBXGain : public BC_TextBox
51 DBXGain(DBXEffect *plugin, int x, int y);
57 class DBXWindow : public BC_Window
60 DBXWindow(DBXEffect *plugin, int x, int y);
61 void create_objects();
63 void update_textboxes();
71 DBXReaction *reaction;
79 class DBXThread : public Thread
82 DBXThread(DBXEffect *plugin);
93 // Units are linear from 0 - 1
103 void remove_point(int number);
105 double get_y(int number);
106 double get_x(int number);
107 // Returns linear output given linear input
108 double calculate_linear(double x);
109 int set_point(double x, double y);
118 ArrayList<compressor_point_t> levels;
121 class DBXEffect : public PluginAClient
124 DBXEffect(PluginServer *server);
127 const char* plugin_title();
128 int is_multichannel();
130 void read_data(KeyFrame *keyframe);
131 void save_data(KeyFrame *keyframe);
132 int process_realtime(long size, double **input_ptr, double **output_ptr);
142 void load_configuration();
148 double **input_buffer;
150 long input_allocated;
151 double *reaction_buffer;
152 long reaction_allocated;
153 long reaction_position;
156 // Same coefs are applied to all channels
158 long coefs_allocated;