#!/usr/bin/env python

import csnd
import sys

#rtmodule = sys.argv[1]
rtmodule = "portaudio"

cmd = 'csound -+rtaudio=' + rtmodule + ' -odac999 test.orc test.sco'
orc = '''sr = 44100
ksmps = 16
nchnls = 2

        instr 11
inothing = 0
        endin'''
sco = '''i11 0 1
e'''

cs = csnd.CppSound()
cs.setCommand(cmd)
cs.setOrchestra(orc)
cs.setScore(sco)
cs.setPythonMessageCallback()
cs.exportForPerformance()
print "####before compile####"
cs.compile()
print "####after compile####"
