r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / level / leveleffect.h
blob86eb53c23d145e805e87fe7e9614ac894f4d6de8
1 #ifndef SOUNDLEVEL_H
2 #define SOUNDLEVEL_H
4 #include "guicast.h"
5 #include "pluginaclient.h"
9 class SoundLevelEffect;
10 class SoundLevelWindow;
15 class SoundLevelConfig
17 public:
18 SoundLevelConfig();
19 void copy_from(SoundLevelConfig &that);
20 int equivalent(SoundLevelConfig &that);
21 void interpolate(SoundLevelConfig &prev,
22 SoundLevelConfig &next,
23 int64_t prev_frame,
24 int64_t next_frame,
25 int64_t current_frame);
26 float duration;
29 class SoundLevelDuration : public BC_FSlider
31 public:
32 SoundLevelDuration(SoundLevelEffect *plugin, int x, int y);
33 int handle_event();
34 SoundLevelEffect *plugin;
37 class SoundLevelWindow : public BC_Window
39 public:
40 SoundLevelWindow(SoundLevelEffect *plugin, int x, int y);
41 void create_objects();
42 int close_event();
45 BC_Title *soundlevel_max;
46 BC_Title *soundlevel_rms;
47 SoundLevelDuration *duration;
48 SoundLevelEffect *plugin;
55 PLUGIN_THREAD_HEADER(SoundLevelEffect, SoundLevelThread, SoundLevelWindow)
60 class SoundLevelEffect : public PluginAClient
62 public:
63 SoundLevelEffect(PluginServer *server);
64 ~SoundLevelEffect();
66 int is_realtime();
67 void read_data(KeyFrame *keyframe);
68 void save_data(KeyFrame *keyframe);
69 int process_realtime(int64_t size, double *input_ptr, double *output_ptr);
73 int load_defaults();
74 int save_defaults();
75 void reset();
76 void update_gui();
77 void render_gui(void *data, int size);
81 PLUGIN_CLASS_MEMBERS(SoundLevelConfig, SoundLevelThread)
83 double rms_accum;
84 double max_accum;
85 int accum_size;
98 #endif