r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / invertaudio / invert.C
blob2256c9276d51eaf20869fbdeaab1b7bf9266280e
1 #include "picon_png.h"
2 #include "pluginaclient.h"
3 #include "vframe.h"
5 #include <libintl.h>
6 #define _(String) gettext(String)
7 #define gettext_noop(String) String
8 #define N_(String) gettext_noop (String)
10 class InvertAudioEffect : public PluginAClient
12 public:
13         InvertAudioEffect(PluginServer *server)
14          : PluginAClient(server)
15         {
16         };
17         ~InvertAudioEffect()
18         {
19         };
21         VFrame* new_picon()
22         {
23                 return new VFrame(picon_png);
24         };
25         char* plugin_title()
26         {
27                 return _("Invert Audio");
28         };
29         int is_realtime()
30         {
31                 return 1;
32         };
33         int process_realtime(int64_t size, double *input_ptr, double *output_ptr)
34         {
35                 for(int i = 0; i < size; i++)
36                         output_ptr[i] = -input_ptr[i];
37                 return 0;
38         };
44 REGISTER_PLUGIN(InvertAudioEffect)