diff options
author | Simon Schampijer <simon@schampijer.de> | 2007-07-16 15:24:39 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2007-07-16 15:24:39 (GMT) |
commit | c96694fce7eebd63a7b1abe27446d677e08a5af0 (patch) | |
tree | 1ab08d0d57afd3342d53862f3cff8e310bc547d7 /csound/csoundserver.py | |
parent | 337c62d81809ce659d117a7535d83835633b01d8 (diff) |
Added support for sound to the memorize activity using csound.
Diffstat (limited to 'csound/csoundserver.py')
-rw-r--r-- | csound/csoundserver.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/csound/csoundserver.py b/csound/csoundserver.py index 6e7c815..c8c799f 100644 --- a/csound/csoundserver.py +++ b/csound/csoundserver.py @@ -13,16 +13,18 @@ class CsoundServer(Thread): Thread.__init__(self) self.csound = csnd.Csound() - def start(self): + def start(self): self.perf = csnd.CsoundPerformanceThread(self.csound) uniorcpath = os.path.join( os.path.dirname(__file__), 'univorc.csd') if not os.path.exists(uniorcpath): _logger.error('univorc not found %s'%uniorcpath) else: - self.csound.Compile(uniorcpath) + if self.csound.Compile(uniorcpath) == -1: + _logger.debug('error compiling csound orchestra %s'%uniorcpath) + return 1 self.perf.Play() - _logger.debug('start csound performance %s'%uniorcpath) - + return 0 + def pause(self): self.perf.Stop() self.perf.Join() |