How to render system input from the remote I/O audio unit and to play these sample in stereo

旧时模样 提交于 2020-01-17 05:08:09

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!