diff options
Diffstat (limited to 'OSC')
-rw-r--r-- | OSC/dumpOSC.c | 21 | ||||
-rw-r--r-- | OSC/makefile | 4 |
2 files changed, 22 insertions, 3 deletions
diff --git a/OSC/dumpOSC.c b/OSC/dumpOSC.c index cbb4514..d74bddc 100644 --- a/OSC/dumpOSC.c +++ b/OSC/dumpOSC.c @@ -64,6 +64,7 @@ Technologies, University of California, Berkeley. */
#include "m_pd.h"
+//#include "m_imp.h"
#include "s_stuff.h"
//#include "x_osc.h"
@@ -524,6 +525,24 @@ int timeRound(double x) {
return x >= 0.0 ? x+0.5 : x-0.5;
}
+/*
+void WriteLogicalTime(char* dst)
+{
+ static double startTime = -1.0;
+ double sTime;
+
+ // Initialisierung der Startzeit.
+ // Knnte effizienter (ohne 'if') auch irgendwo vorher passieren.
+ // Knnte wahrscheinlich auch 0.0 sein.
+ if (startTime < 0.0) {
+ startTime = clock_getlogicaltime();
+ }
+
+ sTime = clock_gettimesince(startTime) * 0.001;
+ *(int32_t*)dst = hton'K l((int32_t)sTime);
+ *(int32_t*)(dst+4) = htonl((int32_t)(4294967296.0 * sTime));
+}
+*/
void WriteLogicalTime(char* dst)
{
@@ -552,7 +571,7 @@ Boolean dumpOSC_SendReply(char *buf, int n, void *clientDesc, int clientDescLeng dt0 = TimeToSeconds(t0); // client time
dt1 = TimeToSeconds(t1); // server time
- fprintf(stderr, "%f\t%f\t%f\n", dt0, dt1, dt0 - dt1);
+ // fprintf(stderr, "%f\t%f\t%f\n", dt0, dt1, dt0 - dt1);
sendto(fd, buf, n, 0, (struct sockaddr *)clientDesc, clientDescLenght);
return TRUE;
diff --git a/OSC/makefile b/OSC/makefile index 9c554d0..e9954e6 100644 --- a/OSC/makefile +++ b/OSC/makefile @@ -19,7 +19,7 @@ DARWINCFLAGS = -DPD -DUNIX -DMACOSX -O2 \ -Wno-unused -Wno-parentheses -Wno-switch # where is your m_pd.h ??? -DARWININCLUDE = -I../../../pd/src -I../../obj +DARWININCLUDE = -I../../build/include -I../../obj DARWINEXTERNALS = htmsocket.o OSC-pattern-match.o sendOSC.o dumpOSC.o routeOSC.o @@ -44,7 +44,7 @@ LINUXCFLAGS = -DPD -DUNIX -O2 -funroll-loops -fomit-frame-pointer \ -Wno-unused -Wno-parentheses -Wno-switch # where is your m_pd.h ??? -LINUXINCLUDE = -I../../../pd-0.37-test4/src +LINUXINCLUDE = -I../../build/include LINUXEXTERNALS = htmsocket.o OSC-pattern-match.o sendOSC.o dumpOSC.o routeOSC.o |