From c96694fce7eebd63a7b1abe27446d677e08a5af0 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Mon, 16 Jul 2007 15:24:39 +0000 Subject: Added support for sound to the memorize activity using csound. --- (limited to 'csound') 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() diff --git a/csound/univorc.csd b/csound/univorc.csd index e4264e9..3851ca3 100644 --- a/csound/univorc.csd +++ b/csound/univorc.csd @@ -1,6 +1,6 @@ --+rtaudio=alsa -odac -m0 -d -b1024 -B4096 +-+rtaudio=alsa -odac -m0 -d -b2048 -B4096 sr=22050 -- cgit v0.9.1