r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / reverb / reverb.h
blob1fd64a5baa490c55a6d724ea07b67e29c0232147
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_multichannel();
64 char* plugin_title();
65 int show_gui();
66 int set_string();
67 void save_data(KeyFrame *keyframe);
68 void read_data(KeyFrame *keyframe);
69 void raise_window();
70 VFrame* new_picon();
72 // non realtime support
73 int load_defaults();
74 int save_defaults();
75 Defaults *defaults;
77 ReverbThread *thread;
78 ReverbEngine **engine;
79 int initialized;
82 class ReverbEngine : public Thread
84 public:
85 ReverbEngine(Reverb *plugin);
86 ~ReverbEngine();
88 int process_overlay(double *in, double *out, double &out1, double &out2, double level, int64_t lowpass, int64_t samplerate, int64_t size);
89 int process_overlays(int output_buffer, int64_t size);
90 int wait_process_overlays();
91 void run();
93 Mutex input_lock, output_lock;
94 int completed;
95 int output_buffer;
96 int64_t size;
97 Reverb *plugin;
100 #endif