USB multi-channel playback with AudioUnit
USB multi-channel playback with AudioUnit
- Subject: USB multi-channel playback with AudioUnit
- From: Christof Faller <email@hidden>
- Date: Fri, 5 Oct 2001 11:15:33 -0400
I got an USB multi-channel playback devide
(emi 2|6) and am playing with it in MacOS X 10.1.
A have a few questions regarding AudioUnits and multi-channel
playback:
I am setting the AudioUnit stream format to multi-channel like this:
austream.mSampleRate = 32000;
austream.mFormatID = kAudioFormatLinearPCM;
austream.mFormatFlags = kLinearPCMFormatFlagIsFloat |
kLinearPCMFormatFlagIsBigEndian | kLinearPCMFormatFlagIsPacked;
austream.mBytesPerPacket = 16;
austream.mFramesPerPacket = 1;
austream.mBytesPerFrame = 16;
austream.mChannelsPerFrame = 4;
austream.mBitsPerChannel = 32;
count = sizeof(AudioStreamBasicDescription);
err = AudioUnitSetProperty(
audiounitinstance,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Input,
0, (void *) &austream, count);
if (err != noErr) {
fprintf(stderr, "Could not setup audio unit stream format
for surround!!\n");
exit(0);
}
But the audio device (USB, emi 2|6) is still only playing stereo. Is it
necessary
to set the stream format for the audio device also to multi-channel,
before
the audio unit actually will play multi-channel??
Chris