hi
i have been looking every for examples on how to use multi channel output happen with core audio. but no luck so far.
i am used to writing my own software in c++ and objective-c, and i am able to put something together to get regular stereo outputs working. but nothing on how to talk to an audio device that has more then 2 channels
here is part of the code that works for stereo outputs:
UInt32 busCount = 3; //numberOfOutputBusses;
AudioStreamBasicDescription outputASBD2 = {
.mSampleRate = 44100,
.mFormatID = kAudioFormatLinearPCM,
.mFormatFlags = kAudioFormatFlagsAudioUnitCanonical,
.mChannelsPerFrame = busCount,
.mFramesPerPacket = 1,
.mBitsPerChannel = sizeof(Float32) * 8,
.mBytesPerPacket = sizeof(Float32) * busCount,
.mBytesPerFrame = sizeof(Float32) * busCount
};
AudioUnitSetProperty(*_unit,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Output,
1,
&outputASBD2,
sizeof(AudioStreamBasicDescription);
any advice would be great.
thx.