olaf neophyte and de.po updates, valgrind tweaks, delete green lady, inkscape dpi=96
[goodguy/history.git] / cinelerra-5.1 / plugins / piano / piano.C
index ec130f15d3e9b230e537939a5f6701a0bc2d8a78..d996be05275dbda93a22aa6b98515c3bf12e1fd8 100644 (file)
@@ -51,7 +51,7 @@ Piano::~Piano()
 }
 
 
-char* Piano::plugin_title() { return _("Pianoesizer"); }
+char* Piano::plugin_title() { return N_("Pianoesizer"); }
 int Piano::is_realtime() { return 1; }
 int Piano::is_synthesis() { return 1; }
 
@@ -76,7 +76,7 @@ void Piano::read_data(KeyFrame *keyframe)
 {
        FileXML input;
 // cause htal file to read directly from text
-       input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data()));
+       input.set_shared_input(keyframe->xbuf);
 
 //printf("Piano::read_data %s\n", keyframe->get_data());
        int result = 0, current_osc = 0, total_oscillators = 0;
@@ -113,7 +113,7 @@ void Piano::save_data(KeyFrame *keyframe)
 {
        FileXML output;
 // cause htal file to store data directly in text
-       output.set_shared_output(keyframe->get_data(), MESSAGESIZE);
+       output.set_shared_output(keyframe->xbuf);
 
        output.tag.set_title("SYNTH");
        output.tag.set_property("WETNESS", config.wetness);
@@ -162,13 +162,13 @@ void Piano::raise_window()
 
 void Piano::update_gui()
 {
-       if(thread)
-       {
-               load_configuration();
-               thread->window->lock_window();
-               thread->window->update_gui();
-               thread->window->unlock_window();
-       }
+       if( !thread ) return;
+       PianoWindow *window = (PianoWindow *)thread->window:
+// load_configuration,read_data deletes oscillator_config
+       window->lock_window("Piano::update_gui");
+       load_configuration();
+       window->update_gui();
+       window->unlock_window();
 }
 
 
@@ -214,7 +214,7 @@ double Piano::solve_eqn(double *output,
        if(config->level <= INFINITYGAIN) return 0;
 
        double result;
-       register double x;
+       double x;
        double power = this->db.fromdb(config->level) * normalize_constant;
        double phase_offset = config->phase * this->period;
        double x3 = x1 + phase_offset;