Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authoramartin <olpc@xo-05-28-21.localdomain>2008-02-12 12:59:37 (GMT)
committer amartin <olpc@xo-05-28-21.localdomain>2008-02-12 12:59:37 (GMT)
commitf52524e274d7e0b47da68b2fb5f27d1bb8e72662 (patch)
tree50fa1e3373b1e7425434910f1826eabdd1680e94 /common
parent2712a2be52a76f28d625d2531b9fe8ac91905603 (diff)
beat sync
Diffstat (limited to 'common')
-rw-r--r--common/Util/CSoundClient.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/Util/CSoundClient.py b/common/Util/CSoundClient.py
index b8919eb..7e8ef78 100644
--- a/common/Util/CSoundClient.py
+++ b/common/Util/CSoundClient.py
@@ -54,6 +54,8 @@ class _CSoundClientPlugin:
_loop_default = self.loopCreate()
self.instrumentDB = InstrumentDB.getRef()
+ self.jamesSux = {} # temporyary dictionary of loopId: loopNumTicks, while I wait for james to implement it properly
+
def __del__(self):
self.connect(False)
sc_destroy()
@@ -158,11 +160,20 @@ class _CSoundClientPlugin:
def loopDestroy(self, loopId):
sc_loop_delete(loopId)
+ try:
+ del self.jamesSux[ loopId ]
+ except:
+ pass
def loopClear(self):
global _loop_default
sc_loop_delete(_loop_default)
_loop_default = sc_loop_new()
+ try:
+ del self.jamesSux[ loopId ]
+ except:
+ pass
+
# this is function deletes an Event from a loop
# TODO: rename this function
@@ -186,9 +197,14 @@ class _CSoundClientPlugin:
def loopSetNumTicks(self,n, loopId=_loop_default):
sc_loop_setNumTicks(loopId, n)
+ self.jamesSux[loopId] = n
+
+ def loopGetNumTicks( self, loopId = _loop_default ):
+ return self.jamesSux[loopId]
def loopSetTickDuration(self,d, loopId=_loop_default):
sc_loop_setTickDuration(loopId, d)
+ james
def loopDeactivate(self, note = 'all', loopId=_loop_default):
if note == 'all':