X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fplugins%2Fcompressor%2Fcompressor.C;h=25eea16e5f6b0e74bc26bfb08d692cc7313db84e;hb=refs%2Fheads%2Fmaster;hp=481988bd16150fb1f9579503c61c0a21750a292a;hpb=21c2e6b36d6a96c2f662a89459d607b5a387f4eb;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/plugins/compressor/compressor.C b/cinelerra-5.1/plugins/compressor/compressor.C index 481988bd..25eea16e 100644 --- a/cinelerra-5.1/plugins/compressor/compressor.C +++ b/cinelerra-5.1/plugins/compressor/compressor.C @@ -114,7 +114,7 @@ void CompressorEffect::reset() current_value = 1.0; } -const char* CompressorEffect::plugin_title() { return _("Compressor"); } +const char* CompressorEffect::plugin_title() { return N_("Compressor"); } int CompressorEffect::is_realtime() { return 1; } int CompressorEffect::is_multichannel() { return 1; } @@ -123,7 +123,7 @@ int CompressorEffect::is_multichannel() { return 1; } void CompressorEffect::read_data(KeyFrame *keyframe) { FileXML input; - input.set_shared_input(keyframe->get_data(), strlen(keyframe->get_data())); + input.set_shared_input(keyframe->xbuf); int result = 0; config.levels.remove_all(); @@ -157,7 +157,7 @@ void CompressorEffect::read_data(KeyFrame *keyframe) void CompressorEffect::save_data(KeyFrame *keyframe) { FileXML output; - output.set_shared_output(keyframe->get_data(), MESSAGESIZE); + output.set_shared_output(keyframe->xbuf); output.tag.set_title("COMPRESSOR"); output.tag.set_property("TRIGGER", config.trigger); @@ -189,15 +189,13 @@ void CompressorEffect::save_data(KeyFrame *keyframe) void CompressorEffect::update_gui() { - if(thread) - { - if(load_configuration()) - { - thread->window->lock_window("CompressorEffect::update_gui"); - ((CompressorWindow*)thread->window)->update(); - thread->window->unlock_window(); - } - } + if( !thread ) return; + CompressorWindow *window = (CompressorWindow*)thread->window; +// load_configuration,read_data deletes levels + window->lock_window("CompressorEffect::update_gui"); + if( load_configuration() ) + window->update(); + window->unlock_window(); } @@ -1073,6 +1071,7 @@ CompressorCanvas::CompressorCanvas(CompressorEffect *plugin, int x, int y, int w { this->plugin = plugin; current_operation = NONE; + current_point = 0; } int CompressorCanvas::button_press_event()