diff options
author | James <olpc@localhost.localdomain> | 2007-02-17 03:45:23 (GMT) |
---|---|---|
committer | James <olpc@localhost.localdomain> | 2007-02-17 03:45:23 (GMT) |
commit | ee0904a24c1b7d6c2f66578607d5a4e7a8e81ab8 (patch) | |
tree | 810da49fc3c3c0fcce53de2547684ef4c1dcf45c /Util/Clooper | |
parent | 1bbaaac5b15bdf69e720e15930b3c8bff7d4f78a (diff) | |
parent | d49ef42a259304a108957c103705d45c47d4956e (diff) |
merging
Diffstat (limited to 'Util/Clooper')
-rw-r--r-- | Util/Clooper/Makefile | 2 | ||||
-rw-r--r-- | Util/Clooper/SClient.py | 2 | ||||
-rw-r--r-- | Util/Clooper/SoundClient.cpp | 39 | ||||
-rw-r--r-- | Util/Clooper/SoundClient.h | 2 | ||||
-rwxr-xr-x | Util/Clooper/_SClient.so | bin | 132068 -> 133980 bytes | |||
-rwxr-xr-x | Util/Clooper/_ttest.so | bin | 39840 -> 0 bytes |
6 files changed, 44 insertions, 1 deletions
diff --git a/Util/Clooper/Makefile b/Util/Clooper/Makefile index c853a6d..87caf59 100644 --- a/Util/Clooper/Makefile +++ b/Util/Clooper/Makefile @@ -16,7 +16,7 @@ all : _SClient.so cmd_csound $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ clean : - rm -f *.o _ttest.so + rm -f *.o _ttest.so _SClient.so cmd_csound: cmd_csound.cpp SoundClient.o g++ -o $@ $^ -lcsound diff --git a/Util/Clooper/SClient.py b/Util/Clooper/SClient.py index 5171569..d27472b 100644 --- a/Util/Clooper/SClient.py +++ b/Util/Clooper/SClient.py @@ -53,6 +53,8 @@ sc_initialize = _SClient.sc_initialize sc_start = _SClient.sc_start sc_stop = _SClient.sc_stop sc_setMasterVolume = _SClient.sc_setMasterVolume +sc_setTrackpadX = _SClient.sc_setTrackpadX +sc_setTrackpadY = _SClient.sc_setTrackpadY sc_inputMessage = _SClient.sc_inputMessage sc_scoreEvent4 = _SClient.sc_scoreEvent4 sc_scoreEvent15 = _SClient.sc_scoreEvent15 diff --git a/Util/Clooper/SoundClient.cpp b/Util/Clooper/SoundClient.cpp index e527c02..6bc92eb 100644 --- a/Util/Clooper/SoundClient.cpp +++ b/Util/Clooper/SoundClient.cpp @@ -363,6 +363,35 @@ struct TamTamSound } } + void setTrackpadX(MYFLT value) + { + if (!csound) { + fprintf(stderr, "skipping %s, csound==NULL\n", __FUNCTION__); + return ; + } + MYFLT *p; + if (!(csoundGetChannelPtr(csound, &p, "trackpadX", CSOUND_CONTROL_CHANNEL | CSOUND_INPUT_CHANNEL))) + *p = (MYFLT) value; + else + { + fprintf(_debug, "ERROR: failed to set trackpad X value\n"); + } + } + + void setTrackpadY(MYFLT value) + { + if (!csound) { + fprintf(stderr, "skipping %s, csound==NULL\n", __FUNCTION__); + return ; + } + MYFLT *p; + if (!(csoundGetChannelPtr(csound, &p, "trackpadY", CSOUND_CONTROL_CHANNEL | CSOUND_INPUT_CHANNEL))) + *p = (MYFLT) value; + else + { + fprintf(_debug, "ERROR: failed to set trackpad Y value\n"); + } + } }; TamTamSound * sc_tt = NULL; @@ -400,6 +429,16 @@ void sc_setMasterVolume(MYFLT v) sc_tt->setMasterVolume(v); } +void sc_setTrackpadX(MYFLT v) +{ + sc_tt->setTrackpadX(v); +} + +void sc_setTrackpadY(MYFLT v) +{ + sc_tt->setTrackpadY(v); +} + void sc_inputMessage(const char *msg) { sc_tt->inputMessage(msg); diff --git a/Util/Clooper/SoundClient.h b/Util/Clooper/SoundClient.h index a946ced..561529b 100644 --- a/Util/Clooper/SoundClient.h +++ b/Util/Clooper/SoundClient.h @@ -13,6 +13,8 @@ extern "C" int sc_start(); int sc_stop(); void sc_setMasterVolume(float); + void sc_setTrackpadX(float); + void sc_setTrackpadY(float); void sc_inputMessage(const char *msg); void sc_scoreEvent4(char type, MYFLT p0, MYFLT p1, MYFLT p2, MYFLT p3); void sc_scoreEvent15(char type, MYFLT p1, MYFLT p2, MYFLT p3, MYFLT p4, MYFLT p5, MYFLT p6, MYFLT p7, MYFLT p8, MYFLT p9, MYFLT p10, MYFLT p11, MYFLT p12, MYFLT p13, MYFLT p14, MYFLT p15); diff --git a/Util/Clooper/_SClient.so b/Util/Clooper/_SClient.so Binary files differindex adbf427..66074a6 100755 --- a/Util/Clooper/_SClient.so +++ b/Util/Clooper/_SClient.so diff --git a/Util/Clooper/_ttest.so b/Util/Clooper/_ttest.so Binary files differdeleted file mode 100755 index 2019799..0000000 --- a/Util/Clooper/_ttest.so +++ /dev/null |