Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Real-Time Audio Callback
-
Any chance we could get a way to have an audio callback? I have no idea what the performance would be like on an iOS device, but it could be useful for playing around with real time audio synthesis :)
I'm imagining something like the below as a light wrapper around Core Audio / AudioQueue:
def audio_callback(buffer): #len(buffer) would be the number of interleaved frames
for i,v in enumerate(buffer):
buffer[i] = 0 #silence
return True # return True if this frame is not silentau = Audio.audio(audio_callback,sample_rate=44100,channels=2,format=float)
au.start() #non-blocking, of course(edit: after looking around I found this.. not sure if it is helpful to you or not: http://wiki.python.org/moin/MacPython/CoreAudio )