Fixed initialisation of tf in file_open(). Without setting the memory to 0,
[cinelerra_cv/mob.git] / plugins / reverb / reverb.h
blob0dc648f90695420ce59234b5754f7cabf9ebf867
1 #ifndef REVERB_H
2 #define REVERB_H
4 class Reverb;
5 class ReverbEngine;
7 #include "reverbwindow.h"
8 #include "pluginaclient.h"
10 class ReverbConfig
12 public:
13 ReverbConfig();
16 int equivalent(ReverbConfig &that);
17 void copy_from(ReverbConfig &that);
18 void interpolate(ReverbConfig &prev,
19 ReverbConfig &next,
20 int64_t prev_frame,
21 int64_t next_frame,
22 int64_t current_frame);
23 void dump();
25 double level_init;
26 int64_t delay_init;
27 double ref_level1;
28 double ref_level2;
29 int64_t ref_total;
30 int64_t ref_length;
31 int64_t lowpass1, lowpass2;
34 class Reverb : public PluginAClient
36 public:
37 Reverb(PluginServer *server);
38 ~Reverb();
40 void update_gui();
41 int load_from_file(char *data);
42 int save_to_file(char *data);
43 int load_configuration();
45 // data for reverb
46 ReverbConfig config;
48 char config_directory[1024];
50 double **main_in, **main_out;
51 double **dsp_in;
52 int64_t **ref_channels, **ref_offsets, **ref_lowpass;
53 double **ref_levels;
54 int64_t dsp_in_length;
55 int redo_buffers;
56 // skirts for lowpass filter
57 double **lowpass_in1, **lowpass_in2;
58 DB db;
59 // required for all realtime/multichannel plugins
61 int process_realtime(int64_t size, double **input_ptr, double **output_ptr);
62 int is_realtime();
63 int is_synthesis();
64 int is_multichannel();
65 char* plugin_title();
66 int show_gui();
67 int set_string();
68 void save_data(KeyFrame *keyframe);
69 void read_data(KeyFrame *keyframe);
70 void raise_window();
71 VFrame* new_picon();
73 // non realtime support
74 int load_defaults();
75 int save_defaults();
76 BC_Hash *defaults;
78 ReverbThread *thread;
79 ReverbEngine **engine;
80 int initialized;
83 class ReverbEngine : public Thread
85 public:
86 ReverbEngine(Reverb *plugin);
87 ~ReverbEngine();
89 int process_overlay(double *in, double *out, double &out1, double &out2, double level, int64_t lowpass, int64_t samplerate, int64_t size);
90 int process_overlays(int output_buffer, int64_t size);
91 int wait_process_overlays();
92 void run();
94 Mutex input_lock, output_lock;
95 int completed;
96 int output_buffer;
97 int64_t size;
98 Reverb *plugin;
101 #endif