Re: CVS Commit 0.95.03: OSC bugfix

Jesse Chappell <[email protected]>
Newsgroups gmane.comp.audio.jamin.devel
Message-ID <[email protected]>
On 11/15/05, Steve Harris <[email protected]> wrote:
> The path in the plugin and controller didnt match the jamin binary. Fixed,
> I think, can someone check it works now?
>
> 2005-11-15  Steve Harris  <[email protected]>
>
>         * Fixed OSC scene path discrepencies.

Good try, but attached is the real fix.  You were using the URI in the
lo_send, where all it should have is the path part.

jlc
jamin_osc_fix.patch (text/x-patch, 1.8 KB)
Index: controller/jamincont_1912.xml
===================================================================
RCS file: /cvsroot/jamin/jamin/controller/jamincont_1912.xml,v
retrieving revision 1.7
diff -u -r1.7 jamincont_1912.xml
--- controller/jamincont_1912.xml	15 Nov 2005 11:08:43 -0000	1.7
+++ controller/jamincont_1912.xml	10 Feb 2006 05:28:35 -0000
@@ -37,7 +37,7 @@
 	  if (last_scene != scene) {
 	    last_scene = scene;
 	    if (last_scene > 0 && last_scene <= NUM_SCENES) {
-	      lo_send(address, SCENE_URI, "i", last_scene);
+	      lo_send(address, OSC_PATH, "i", last_scene);
 	    }
 	  }
 #ifdef DEBUG
Index: src/main.c
===================================================================
RCS file: /cvsroot/jamin/jamin/src/main.c,v
retrieving revision 1.61
diff -u -r1.61 main.c
--- src/main.c	15 Nov 2005 11:08:43 -0000	1.61
+++ src/main.c	10 Feb 2006 05:28:35 -0000
@@ -75,6 +75,7 @@
 {
 #ifdef HAVE_OSC
     lo_server_thread st;
+    char * urlstr;
 #endif
 
 #ifdef ENABLE_NLS
@@ -131,6 +132,9 @@
     if (st) {
 	lo_server_thread_add_method(st, OSC_PATH, "i", scene_handler, NULL);
 	lo_server_thread_start(st);
+	urlstr = lo_server_thread_get_url (st);
+	fprintf(stderr, "Started OSC server thread at %s\n", urlstr);
+	free (urlstr);
     } else {
 	fprintf(stderr, "This " PACKAGE " instance will not have OSC support,\n"		"probably the port is allread in use\n");
     }
Index: src/jamin-scene.c
===================================================================
RCS file: /cvsroot/jamin/jamin/src/jamin-scene.c,v
retrieving revision 1.5
diff -u -r1.5 jamin-scene.c
--- src/jamin-scene.c	3 Oct 2004 14:12:38 -0000	1.5
+++ src/jamin-scene.c	10 Feb 2006 05:28:35 -0000
@@ -38,7 +38,7 @@
     }
 
     addr = lo_address_new(NULL, OSC_PORT);
-    lo_send(addr, SCENE_URI, "i", scene);
+    lo_send(addr, OSC_PATH, "i", scene);
 
     return 0;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.