FILE *fp = fopen(defaults_path,"r");
if( !fp ) return 0;
char ff_plugin[BCSTRLEN], ff_args[BCTEXTLEN], *ap = 0;
- while( !ap && fgets(ff_args, sizeof(ff_args), fp) ) {
- if( *(ap=ff_args) == ';' ) continue;
- if( *(ap=ff_args) == '#' ) ++ap;
+ while( fgets(ff_args, sizeof(ff_args), fp) ) {
+ char *cp = ff_args;
+ if( *cp == ';' ) continue;
+ if( *cp == '#' ) ++cp;
char *bp = ff_plugin, *ep = bp + sizeof(ff_plugin)-1;
- while( bp < ep && *ap && *ap != '\n' && *ap != ' ' ) *bp++ = *ap++;
+ while( bp < ep && *cp && *cp != '\n' && *cp != ' ' ) *bp++ = *cp++;
*bp = 0;
- if( strcmp(ff_plugin, name) ) ap = 0;
+ if( !strcmp(ff_plugin, name) ) { ap = cp; break; }
}
fclose(fp);
if( !ap ) return 0;
#define __VERSIONINFO_H__
#define CINELERRA_VERSION "5.1"
-#define REPOMAINTXT " git://git.cinelerra-cv.org/goodguy/cinelerra.git "
-#define COPYRIGHT_DATE "2015"
-#define COPYRIGHT_OWNER "Adam Williams"
-#define COPYRIGHTTEXT1 "(c)" COPYRIGHT_DATE ": " COPYRIGHT_OWNER "\n"
-#define COPYRIGHTTEXT2
+#define REPOMAINTXT " git://git.cinelerra-cv.org/goodguy/cinelerra.git\n"
+#define COPYRIGHT_DATE "2017"
+#define COPYRIGHTTEXT1 "(c) 2006-2016 Heroine Virtual Ltd. by Adam Williams\n"
+#define COPYRIGHTTEXT2 "(c) 2007-2017 cin5 derivative by W.P. Morrow aka goodguy\n"
#undef COMPILEDATE
#endif
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();
}
void GraphicEQ::update_gui()
{
- if(thread)
- {
- if(load_configuration() &&
- ((GraphicGUI*)thread->window)->canvas->state != GraphicCanvas::DRAG_POINT)
- {
- ((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui");
- ((GraphicGUI*)thread->window)->update_canvas();
- ((GraphicGUI*)thread->window)->update_textboxes();
- ((GraphicGUI*)thread->window)->unlock_window();
- }
- else
- {
- int total_frames = get_gui_update_frames();
+ if( !thread ) return;
+ GraphicGUI *window = (GraphicGUI *)thread->window;
+//lock here for points, needed by window cursor_motion callback
+// deleted in load_configuration by read_data
+ window->lock_window("GraphicEQ::update_gui");
+ if( load_configuration() &&
+ window->canvas->state != GraphicCanvas::DRAG_POINT ) {
+ window->update_canvas();
+ window->update_textboxes();
+ }
+ else {
+ int total_frames = get_gui_update_frames();
//printf("ParametricEQ::update_gui %d %d\n", __LINE__, total_frames);
- if(total_frames)
- {
- ((GraphicGUI*)thread->window)->lock_window("GraphicEQ::update_gui");
- ((GraphicGUI*)thread->window)->update_canvas();
- ((GraphicGUI*)thread->window)->unlock_window();
- }
- }
+ if( total_frames )
+ window->update_canvas();
}
+ window->unlock_window();
}
void GraphicEQ::reconfigure()
void HistogramMain::update_gui()
{
- if(thread)
- {
- thread->window->lock_window("HistogramMain::update_gui");
- int reconfigure = load_configuration();
- if(reconfigure)
- {
- HistogramWindow *window = (HistogramWindow *)thread->window;
- window->update(0);
- if(!config.automatic)
- {
- window->update_input();
- }
- }
- thread->window->unlock_window();
+ if( !thread ) return;
+ HistogramWindow *window = (HistogramWindow *)thread->window;
+// points delete in load_configuration,read_data
+ window->lock_window("HistogramMain::update_gui");
+ if( load_configuration() ) {
+ window->update(0);
+ if(!config.automatic)
+ window->update_input();
}
+ window->unlock_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();
}
}
}
}
-
- if(thread)
- {
- ((RGB601Window*)thread->window)->update();
- }
}
-
#define CREATE_TABLE(max) \
{ \
for(int i = 0; i < max; i++) \
void Synth::update_gui()
{
- if(thread)
- {
- if(load_configuration())
- {
- thread->window->lock_window();
- ((SynthWindow*)thread->window)->update_gui();
- thread->window->unlock_window();
- }
- }
+ if( !thread ) return;
+ SynthWindow *window = (SynthWindow*)thread->window;
+// load_configuration,read_data deletes oscillator_config
+ window->lock_window("Synth::update_gui");
+ if( load_configuration() )
+ window->update_gui();
+ window->unlock_window();
}