Hi, our Mac app uses AUHAL for audio output. The data we’re playing has channels laid out in the WAVE default ordering (this is the same order as Core Audio’s AudioChannelBitmap). Playing this data usually results in the correct channel playing through the correct speaker, but there are cases where it does not:
Outputting audio over HDMI usually results in the Center and LFE channels being swapped
Or “Configure Speakers” in Audio MIDI Setup.app can be used to change the speaker<->channel mapping (i.e. even swapping L/R on a 2ch stereo setup), but this does not affect our app’s audio
I’ve found that getting kAudioUnitProperty_AudioChannelLayout on an output unit returns the speaker<->channel mapping as set up in Audio MIDI Setup (i.e. it shows that Center/LFE swap, or if L/R are swapped).
My question: is it possible to have Core Audio do the channel remapping between the WAVE default ordering, and the speaker<->channel mapping as returned by kAudioUnitProperty_AudioChannelLayout? I have tried setting kAudioUnitProperty_AudioChannelLayout on the input unit, and didn’t see a change. I’ve also tried to set kAudioOutputUnitProperty_ChannelMap on the output unit but cannot get it to work.
Or do I need to remap the channels myself before giving samples to Core Audio?
Topic:
Media Technologies
SubTopic:
Audio
4
0
127