dynamic keyframes, textbox rework, andrea ffmpeg.opts, perpetual chkpt undo, lv2...
[goodguy/history.git] / cinelerra-5.1 / plugins / echocancel / echocancel.C
index 31c4dc4ec42d01f7e1ef8c7a48e02c7fb676385a..379fbe4b33e9c228fd29f3e08f7e80892f5deda0 100644 (file)
@@ -25,7 +25,7 @@
 #include "bchash.h"
 #include "filexml.h"
 #include "language.h"
-#include "cicolors.h"
+#include "bccolors.h"
 #include "samples.h"
 #include "echocancel.h"
 #include "theme.h"
@@ -720,7 +720,7 @@ remove(int len)
                sample_data -= len;
 }
 
-const char* EchoCancel::plugin_title() { return _("EchoCancel"); }
+const char* EchoCancel::plugin_title() { return N_("EchoCancel"); }
 int EchoCancel::is_realtime() { return 1; }
 
 static inline double sqr(double v) { return v*v; }
@@ -743,7 +743,7 @@ static inline void cx_product(int n, int sf, double *rp, double *ip,
 static inline void cj_product(int n, int sf, double *rp, double *ip,
                double *arp, double *aip, double *brp, double *bip)
 {
-       int m = !sf ? n : n/2, i = 0;
+       int m = !sf ? n-1 : n/2, i = 0;
        while( i <= m ) {
                double ar = arp[i], ai = aip[i];
                double br = brp[i], bi = -bip[i];
@@ -1188,7 +1188,7 @@ void EchoCancel::read_data(KeyFrame *keyframe)
 {
        int result;
        FileXML input;
-       input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+       input.set_shared_input(keyframe->xbuf);
 
        while(!(result = input.read_tag()) ) {
                if( !input.tag.title_is("ECHOCANCEL")) continue;
@@ -1211,7 +1211,7 @@ void EchoCancel::read_data(KeyFrame *keyframe)
 void EchoCancel::save_data(KeyFrame *keyframe)
 {
        FileXML output;
-       output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+       output.set_shared_output(keyframe->xbuf);
 
        output.tag.set_title("ECHOCANCEL");
        output.tag.set_property("LEVEL", config.level);