dynamic keyframes, textbox rework, andrea ffmpeg.opts, perpetual chkpt undo, lv2...
[goodguy/history.git] / cinelerra-5.1 / plugins / echo / echo.C
index f65f9dc5d5b0ebefd9f9a926df574fffd700b023..ca23bbcf97c61956097530730361e7e05c88e56d 100644 (file)
@@ -2,21 +2,21 @@
 /*
  * CINELERRA
  * Copyright (C) 1997-2011 Adam Williams <broadcast at earthling dot net>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- * 
+ *
  */
 
 #include "bcdisplayinfo.h"
@@ -25,7 +25,7 @@
 #include "bchash.h"
 #include "filexml.h"
 #include "language.h"
-#include "cicolors.h"
+#include "bccolors.h"
 #include "samples.h"
 #include "echo.h"
 #include "theme.h"
@@ -61,7 +61,7 @@ void EchoConfig::copy_from(EchoConfig &that)
        offset = that.offset;
 }
 
-void EchoConfig::interpolate(EchoConfig &prev, EchoConfig &next, 
+void EchoConfig::interpolate(EchoConfig &prev, EchoConfig &next,
        int64_t prev_frame, int64_t next_frame, int64_t current_frame)
 {
        double frames = next_frame - prev_frame;
@@ -123,7 +123,7 @@ int EchoAtten::handle_event()
 }
 
 EchoOffset::EchoOffset(EchoWindow *window, int x, int y)
- : BC_FPot(x, y, window->plugin->config.offset, 0, 999)
+ : BC_FPot(x, y, window->plugin->config.offset, 1, 999)
 {
         this->window = window;
 }
@@ -142,13 +142,13 @@ int EchoOffset::handle_event()
 void EchoWindow::create_objects()
 {
        int x = 170, y = 10;
-       add_subwindow(level_title=new EchoTitle(5, y + 10, _("Level: "), 
+       add_subwindow(level_title=new EchoTitle(5, y + 10, _("Level: "),
                plugin->db.fromdb(plugin->config.level)));
        add_subwindow(level = new EchoLevel(this, x, y)); y += 25;
        add_subwindow(atten_title=new EchoTitle(5, y + 10, _("Atten: "),
                plugin->db.fromdb(plugin->config.atten)));
        add_subwindow(atten = new EchoAtten(this, x + 35, y)); y += 25;
-       add_subwindow(offset_title=new EchoTitle(5, y + 10, _("Offset: "), 
+       add_subwindow(offset_title=new EchoTitle(5, y + 10, _("Offset: "),
                (int)plugin->config.offset));
        add_subwindow(offset = new EchoOffset(this, x, y)); y += 25;
        show_window();
@@ -207,7 +207,7 @@ void Echo::reset()
        bfr_pos = 0;
 }
 
-const char* Echo::plugin_title() { return _("Echo"); }
+const char* Echo::plugin_title() { return N_("Echo"); }
 int Echo::is_realtime() { return 1; }
 int Echo::is_multichannel() { return 1; }
 
@@ -304,7 +304,7 @@ void Echo::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("ECHO")) continue;
@@ -318,7 +318,7 @@ void Echo::read_data(KeyFrame *keyframe)
 void Echo::save_data(KeyFrame *keyframe)
 {
        FileXML output;
-       output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+       output.set_shared_output(keyframe->xbuf);
 
        output.tag.set_title("ECHO");
        output.tag.set_property("LEVEL", config.level);