diff options
Diffstat (limited to 'TamTam.py')
-rwxr-xr-x | TamTam.py | 36 |
1 files changed, 6 insertions, 30 deletions
@@ -52,35 +52,11 @@ class TamTam(Activity): def __init__(self): Activity.__init__(self) - def do_quit(event, param): - CSoundClient.sendText('off()') - print 'do_quit() waiting' - #we know that quitting doesn't really work - time.sleep(0.5) - os.kill(pid, signal.SIGKILL) - time.sleep(0.3) - os.wait() - print '... phew!' - - try : - pid = os.fork() - - if pid > 0 : - time.sleep(1) - CSoundClient.initialize() - tamtam = StandAlonePlayer() - tamtam.connect('destroy', do_quit, pid) - self.add(tamtam) - tamtam.show() - - else: - server = CsoundServerMult( ( CSoundConstants.SERVER_ADDRESS, CSoundConstants.SERVER_PORT ) ) - server.interpret() - - except OSError, e: - print >>sys.stderr, "fork failed: %d (%s)" % (e.errno, e.strerror) - sys.exit(1) + CSoundClient.initialize() + tamtam = StandAlonePlayer() + #tamtam.connect('destroy', self.do_quit) + #self.add(tamtam) + tamtam.show() - def do_quit(self, event, app): + def do_quit(self): del app - |