r1008: pt_BR translation update
[cinelerra_cv/mob.git] / plugins / spectrogram / spectrogram.h
blob600cee387df07ff741aedd94f836c3e552788735
1 #ifndef SPECTROGRAM_H
2 #define SPECTROGRAM_H
9 #include "bchash.inc"
10 #include "fourier.h"
11 #include "guicast.h"
12 #include "mutex.h"
13 #include "pluginaclient.h"
14 #include "vframe.inc"
19 class Spectrogram;
20 class SpectrogramFFT;
23 class SpectrogramLevel : public BC_FPot
25 public:
26 SpectrogramLevel(Spectrogram *plugin, int x, int y);
27 int handle_event();
28 Spectrogram *plugin;
32 class SpectrogramWindow : public BC_Window
34 public:
35 SpectrogramWindow(Spectrogram *plugin, int x, int y);
36 ~SpectrogramWindow();
38 void create_objects();
39 int close_event();
40 void update_gui();
42 SpectrogramLevel *level;
43 Spectrogram *plugin;
44 int done;
45 BC_SubWindow *canvas;
50 PLUGIN_THREAD_HEADER(Spectrogram, SpectrogramThread, SpectrogramWindow)
54 class SpectrogramFFT : public CrossfadeFFT
56 public:
57 SpectrogramFFT(Spectrogram *plugin);
58 ~SpectrogramFFT();
60 int signal_process();
61 int read_samples(int64_t output_sample,
62 int samples,
63 double *buffer);
65 Spectrogram *plugin;
69 class SpectrogramConfig
71 public:
72 SpectrogramConfig();
73 double level;
77 class Spectrogram : public PluginAClient
79 public:
80 Spectrogram(PluginServer *server);
81 ~Spectrogram();
83 VFrame* new_picon();
84 char* plugin_title();
85 int is_realtime();
86 int process_buffer(int64_t size,
87 double *buffer,
88 int64_t start_position,
89 int sample_rate);
90 int show_gui();
91 void raise_window();
92 int set_string();
93 void load_configuration();
94 int load_defaults();
95 int save_defaults();
96 void read_data(KeyFrame *keyframe);
97 void save_data(KeyFrame *keyframe);
98 void update_gui();
99 void render_gui(void *data, int size);
101 void reset();
103 int done;
105 int need_reconfigure;
106 BC_Hash *defaults;
107 SpectrogramConfig config;
108 SpectrogramThread *thread;
109 SpectrogramFFT *fft;
110 float *data;
111 int total_windows;
115 #endif