r1006: configure: Use libx264_pic instead of libx264 if available.
[cinelerra_cv/mob.git] / plugins / pitch / pitch.h
blobc072319cbe23b5ad54b29a48a2cda7b06f52db20
1 #ifndef PITCH_H
2 #define PITCH_H
6 #include "bchash.inc"
7 #include "fourier.h"
8 #include "guicast.h"
9 #include "mutex.h"
10 #include "pluginaclient.h"
11 #include "vframe.inc"
14 class PitchEffect;
16 class PitchScale : public BC_FPot
18 public:
19 PitchScale(PitchEffect *plugin, int x, int y);
20 int handle_event();
21 PitchEffect *plugin;
24 class PitchWindow : public BC_Window
26 public:
27 PitchWindow(PitchEffect *plugin, int x, int y);
28 void create_objects();
29 void update();
30 int close_event();
31 PitchScale *scale;
32 PitchEffect *plugin;
35 PLUGIN_THREAD_HEADER(PitchEffect, PitchThread, PitchWindow)
38 class PitchConfig
40 public:
41 PitchConfig();
44 int equivalent(PitchConfig &that);
45 void copy_from(PitchConfig &that);
46 void interpolate(PitchConfig &prev,
47 PitchConfig &next,
48 int64_t prev_frame,
49 int64_t next_frame,
50 int64_t current_frame);
53 double scale;
56 class PitchFFT : public CrossfadeFFT
58 public:
59 PitchFFT(PitchEffect *plugin);
60 ~PitchFFT();
61 int signal_process_oversample(int reset);
62 int read_samples(int64_t output_sample,
63 int samples,
64 double *buffer);
65 PitchEffect *plugin;
67 double *last_phase;
68 double *new_freq;
69 double *new_magn;
70 double *sum_phase;
71 double *anal_freq;
72 double *anal_magn;
75 class PitchEffect : public PluginAClient
77 public:
78 PitchEffect(PluginServer *server);
79 ~PitchEffect();
81 VFrame* new_picon();
82 char* plugin_title();
83 int is_realtime();
84 void read_data(KeyFrame *keyframe);
85 void save_data(KeyFrame *keyframe);
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();
97 int load_defaults();
98 int save_defaults();
99 int load_configuration();
100 void reset();
101 void update_gui();
104 BC_Hash *defaults;
105 PitchThread *thread;
106 PitchFFT *fft;
107 PitchConfig config;
111 #endif