Search code examples
core-audiovoipaudiounitmixerremoteio

Multichannel Mixer + Voice-Processing IO Unit


I have an AUGraph setup and working, it consists of a multichannel mixer (with a single monophonic input) feeding a RemoteIO (kAudioUnitSubType_RemoteIO) unit to output to the speaker. I implemented the single input mixer in order to be able to pan my audio source between Left and Right hardware output channels. This works just fine.

As this is a VOIP application, I have been experimenting with using a Voice-processing IO Unit (kAudioUnitSubType_VoiceProcessingIO) in place of the Remote IO Unit (kAudioUnitSubType_RemoteIO). Per Apple's description, this unit should behave like a Remote IO unit with some extra features...

The Voice-Processing I/O unit (subtype kAudioUnitSubType_VoiceProcessingIO) has the characteristics of the Remote I/O unit and adds echo suppression for two-way duplex communication. It also adds automatic gain correction, adjustment of voice-processing quality, and muting. This is the correct I/O unit to use for VoIP (Voice over Internet Protocol) apps.

But I am noting that when I switch to the Voice Processing IO Unit, I lose the ability to pan using the mixer. Any ideas as to what is going on here? Is the Voice Processing IO Unit inherently monophonic?


Solution

  • For my particular AUGraph, a Multichannel Mixer Output feeding the IO Unit, dumping the ASBD for the input scope of the IO Unit always shows 2 channels per frame. As I understand from the documentation, the Multichannel Mixer's output is stereo.

    I dumped the ASBD for the output scope of the RemoteIO unit and indeed the ASBD shows 2 channels per frame. Trying to overwrite this to 1 channel resulted in a kAudioUnitErr_PropertyNotWritable error.

    Then I switched the subtype to the VPIO unit. Dumping the ASBD for the output scope shows 1 channel per frame. And as above, trying to overwrite this to 2 channels also resulted in the same property-not-writable error.

    So at least for my particular AUGraph , I must conclude that the VPIO unit is inherently monophonic.