Although I searched in the Internet, I still can't find any answer to my question. I see there are two kinds of callback functions, and as the describe of audio unit properties, one is called inputcallback function and the other is called rendercallback function.
@constant kAudioOutputUnitProperty_SetInputCallback
@discussion Scope: Global
Value Type: AURenderCallbackStruct
Access: read/write
@constant kAudioUnitProperty_SetRenderCallback
Scope: Input
Value Type: AURenderCallbackStruct
Access: Write
I don't know what's the difference between these two, and when or which shall I pick each of it. if there is anyone know about it, please help me.
Maybe it's not a difficult question, but I can't solve it for few days. Thank you very much.
kAudioOutputUnitProperty_SetInputCallback
is used when the microphone takes in data, this allows you to dictate what you want to do with that data. In this call back you write where you want to put that data.
kAudioUnitProperty_SetRenderCallback
you will often see the term "pull" with this one. This is used when the speakers needs more data to output to the speakers. So it will pull in the audio data that you provide in that callback.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With