[SCM] calf/master: + DSSI: don't request graph updates when GUI is hidden; minor demuckification

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:39:03 UTC 2013


The following commit has been merged in the master branch:
commit 5367153126d719aa6c491b638d1b97e90c27bd02
Author: Krzysztof Foltman <wdev at foltman.com>
Date:   Fri Jan 23 20:31:46 2009 +0000

    + DSSI: don't request graph updates when GUI is hidden; minor demuckification

diff --git a/src/dssigui.cpp b/src/dssigui.cpp
index 0ad4199..99437b3 100644
--- a/src/dssigui.cpp
+++ b/src/dssigui.cpp
@@ -346,31 +346,37 @@ struct dssi_osc_server: public osc_server, public osc_message_sink<osc_strstream
     
     static gboolean on_idle(void *self)
     {
-        ((dssi_osc_server *)(self))->send_osc_update();
+        dssi_osc_server *self_ptr = (dssi_osc_server *)(self);
+        if (self_ptr->osc_link_active)
+            self_ptr->send_osc_update();
         return TRUE;
     }
     
-    void set_osc_update(bool enabled)
-    {
-        osc_link_active = enabled;
-        osc_inline_typed_strstream data;
-        data << "OSC:FEEDBACK_URI";
-        data << (enabled ? get_uri() : "");
-        cli.send("/configure", data);
-    }
-    void send_osc_update()
-    {
-        static int serial_no = 0;
-        osc_inline_typed_strstream data;
-        data << "OSC:UPDATE";
-        data << calf_utils::i2s(serial_no++);
-        cli.send("/configure", data);
-    }
+    void set_osc_update(bool enabled);
+    void send_osc_update();
     
     virtual void receive_osc_message(std::string address, std::string args, osc_strstream &buffer);
     void unmarshal_line_graph(osc_strstream &buffer);
 };
 
+void dssi_osc_server::set_osc_update(bool enabled)
+{
+    osc_link_active = enabled;
+    osc_inline_typed_strstream data;
+    data << "OSC:FEEDBACK_URI";
+    data << (enabled ? get_uri() : "");
+    cli.send("/configure", data);
+}
+
+void dssi_osc_server::send_osc_update()
+{
+    static int serial_no = 0;
+    osc_inline_typed_strstream data;
+    data << "OSC:UPDATE";
+    data << calf_utils::i2s(serial_no++);
+    cli.send("/configure", data);
+}
+
 void dssi_osc_server::unmarshal_line_graph(osc_strstream &buffer)
 {
     uint32_t cmd;

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list