diff options
author | James <olpc@localhost.localdomain> | 2007-02-28 02:16:35 (GMT) |
---|---|---|
committer | James <olpc@localhost.localdomain> | 2007-02-28 02:16:35 (GMT) |
commit | 63896fe4894554d4ed3f769c62755d88bee3f201 (patch) | |
tree | 64e1ecb21848db3f23c1e959ea99c6fa70f2e2a4 /Util/Clooper | |
parent | 23b868606bb363d10499be3a09128c088f950421 (diff) | |
parent | da65555ea722c1a71c6c64704aeeb29640f561f9 (diff) |
merge
Diffstat (limited to 'Util/Clooper')
-rw-r--r-- | Util/Clooper/aclient.cpp | 31 | ||||
-rwxr-xr-x | Util/Clooper/aclient.so | bin | 236687 -> 238264 bytes |
2 files changed, 31 insertions, 0 deletions
diff --git a/Util/Clooper/aclient.cpp b/Util/Clooper/aclient.cpp index 9317ed2..560217a 100644 --- a/Util/Clooper/aclient.cpp +++ b/Util/Clooper/aclient.cpp @@ -603,6 +603,24 @@ thread_fn_cleanup: } } + void setTrackVolume(MYFLT vol, int Id) + { + if (!csound) { + fprintf(stderr, "skipping %s, csound==NULL\n", __FUNCTION__); + return ; + } + MYFLT *p; + char buf[128]; + sprintf( buf, "trackVolume%i", Id); + fprintf(stderr, "DEBUG: setTrackvolume string [%s]\n", buf); + if (!(csoundGetChannelPtr(csound, &p, buf, CSOUND_CONTROL_CHANNEL | CSOUND_INPUT_CHANNEL))) + *p = (MYFLT) vol; + else + { + if (_debug) fprintf(_debug, "ERROR: failed to set track volume\n"); + } + } + void setTrackpadX(MYFLT value) { if (!csound) { @@ -756,6 +774,18 @@ DECL(sc_setMasterVolume) //(float v) Py_INCREF(Py_None); return Py_None; } +DECL(sc_setTrackVolume) //(float v) +{ + float v; + int i; + if (!PyArg_ParseTuple(args, "fi", &v, &i)) + { + return NULL; + } + sc_tt->setTrackVolume(v,i); + Py_INCREF(Py_None); + return Py_None; +} DECL(sc_setTrackpadX) //(float v) { float v; @@ -920,6 +950,7 @@ static PyMethodDef SpamMethods[] = { {"sc_stop", sc_stop, METH_VARARGS,""}, {"sc_scoreEvent", sc_scoreEvent, METH_VARARGS, ""}, {"sc_setMasterVolume", sc_setMasterVolume, METH_VARARGS, ""}, + {"sc_setTrackVolume", sc_setTrackVolume, METH_VARARGS, ""}, {"sc_setTrackpadX", sc_setTrackpadX, METH_VARARGS, ""}, {"sc_setTrackpadY", sc_setTrackpadY, METH_VARARGS, ""}, MDECL(sc_loop_getTick) diff --git a/Util/Clooper/aclient.so b/Util/Clooper/aclient.so Binary files differindex e56b047..ed6238a 100755 --- a/Util/Clooper/aclient.so +++ b/Util/Clooper/aclient.so |