From 1d3741efd41bdcde88f05b210ebae218acc6967d Mon Sep 17 00:00:00 2001 From: "Tim E. Real" Date: Thu, 14 Apr 2011 01:56:08 +0000 Subject: Another fix for FLAM GUI controls - 300ms delay before sending control values in PluginI::oscUpdate() --- muse2/ChangeLog | 3 +++ muse2/muse/plugin.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/muse2/ChangeLog b/muse2/ChangeLog index 9241b4cb..92b25883 100644 --- a/muse2/ChangeLog +++ b/muse2/ChangeLog @@ -1,3 +1,6 @@ +12.04.2011: + - Another fix for FLAM GUI controls - 300ms delay before sending control values in PluginI::oscUpdate(). (Tim) + Good enough? How to make sure (any) gui is really ready? 11.04.2011: - Possible fix for FLAM GUI controls - send current control values in PluginI::oscUpdate().(Tim) 10.04.2011: diff --git a/muse2/muse/plugin.cpp b/muse2/muse/plugin.cpp index 0acb5f8b..06e72e4e 100644 --- a/muse2/muse/plugin.cpp +++ b/muse2/muse/plugin.cpp @@ -2538,12 +2538,17 @@ int PluginI::oscUpdate() _oscIF.oscSendProgram(prog, bank); */ + // FIXME: TESTING FLAM: I have to put a delay because flammer hasn't opened yet. + // How to make sure gui is ready? + usleep(300000); + // Send current control values. //unsigned long ports = controlPorts; for(int i = 0; i < controlPorts; ++i) { //unsigned long k = synth->pIdx(i); //_oscIF.oscSendControl(k, controls[i]); + //printf("PluginI::oscUpdate() sending control:%d val:%f\n", i, controls[i].val); _oscif.oscSendControl(controls[i].idx, controls[i].val); // Avoid overloading the GUI if there are lots and lots of ports. if((i+1) % 50 == 0) -- cgit v1.2.3