Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/Clooper
diff options
context:
space:
mode:
authorJames <olpc@xo-05-28-3A.localdomain>2007-07-18 22:46:27 (GMT)
committer James <olpc@xo-05-28-3A.localdomain>2007-07-18 22:46:27 (GMT)
commit350b3270ad715b6e6aa6fbd7a22e3aeae44504ac (patch)
tree0d1e5d160cbe2dbbded283950acc3fb3a3e80fb3 /Util/Clooper
parentf51286d64da92e0583f45c96b16417773c5855f6 (diff)
added setchannel to csoundclient
Diffstat (limited to 'Util/Clooper')
-rw-r--r--Util/Clooper/aclient.cpp33
-rwxr-xr-xUtil/Clooper/aclient.sobin47718 -> 49464 bytes
2 files changed, 33 insertions, 0 deletions
diff --git a/Util/Clooper/aclient.cpp b/Util/Clooper/aclient.cpp
index 861b590..baa7419 100644
--- a/Util/Clooper/aclient.cpp
+++ b/Util/Clooper/aclient.cpp
@@ -614,6 +614,26 @@ struct TamTamSound
return csound != NULL;
}
+ void setChannel(const char * name, MYFLT vol)
+ {
+ if (!csound) {
+ ll->printf(1, "skipping %s, csound==NULL\n", __FUNCTION__);
+ return;
+ }
+ if (!ThreadID)
+ {
+ if (_debug && (VERBOSE > 1)) fprintf(_debug, "skipping %s, ThreadID==NULL\n", __FUNCTION__);
+ return ;
+ }
+ MYFLT *p;
+ if (!(csoundGetChannelPtr(csound, &p, name, CSOUND_CONTROL_CHANNEL | CSOUND_INPUT_CHANNEL)))
+ *p = (MYFLT) vol;
+ else
+ {
+ if (_debug && (VERBOSE >0)) fprintf(_debug, "ERROR: failed to set channel: %s\n", name);
+ }
+ }
+
void setMasterVolume(MYFLT vol)
{
if (!csound) {
@@ -825,6 +845,18 @@ DECL(sc_scoreEvent) //(char type, farray param)
assert(!"not reached");
return NULL;
}
+DECL(sc_setChannel) //(float v)
+{
+ const char * str;
+ float v;
+ if (!PyArg_ParseTuple(args, "sf", &str,&v))
+ {
+ return NULL;
+ }
+ sc_tt->setChannel(str,v);
+ Py_INCREF(Py_None);
+ return Py_None;
+}
DECL(sc_setMasterVolume) //(float v)
{
float v;
@@ -1020,6 +1052,7 @@ static PyMethodDef SpamMethods[] = {
MDECL(sc_start),
MDECL(sc_stop),
MDECL(sc_scoreEvent),
+ MDECL(sc_setChannel),
MDECL(sc_setMasterVolume),
MDECL(sc_setTrackVolume),
MDECL(sc_setTrackpadX),
diff --git a/Util/Clooper/aclient.so b/Util/Clooper/aclient.so
index 5143f9d..b089412 100755
--- a/Util/Clooper/aclient.so
+++ b/Util/Clooper/aclient.so
Binary files differ