Hi,
I found that it’s possible to record directly through ctcsound.
I’m trying something like this, but the .wav file is always corrupted.
cs_return = cs.start()
pt = ctcsound.CsoundPerformanceThread(cs.csound())
if cs_return == ctcsound.CSOUND_SUCCESS:
print('CSOUND is ON!')
filename = '/Users/j/Desktop/out.wav'
bits = 24
numbufs = 2
print('Record ON')
pt.record(filename, bits, numbufs)
pt.play()
while pt.status() == 0:
pass
pt.stopRecord()
print('Record OFF')
cs.cleanup()