问题
I am implementing a play through program from a (mono) microphone to a stereo output. For the output I configured a AudioStreamBasicDescription with two channels and set this ASBD to the input scope of the remote I/O unit.
However, when I configure the render callback to draw the system input no audio is played. On the other hand, when the ASBD is set to a single channel, audio is played without problems.
The audio unit render is implemented by:
AudioUnitRender(_rioUnit, ioActionFlags, inTimeStamp, 1, inNumberFrames, ioData)
Apparently, this is not sufficient to process and play the rendered input. Does anyone know how this should be done?
回答1:
The number of channels in the ASBD for both sides of RemoteIO should be set the same, both mono, or both stereo. If you want stereo output, configure stereo input. Even if a monophonic mic is plugged-in (or internal).
来源:https://stackoverflow.com/questions/35015519/how-to-render-system-input-from-the-remote-i-o-audio-unit-and-to-play-these-samp