Re: USB multi-channel playback with AudioUnit
Re: USB multi-channel playback with AudioUnit
- Subject: Re: USB multi-channel playback with AudioUnit
- From: Bill Stewart <email@hidden>
- Date: Fri, 5 Oct 2001 19:22:54 -0700
On Friday, October 5, 2001, at 08:15 AM, Christof Faller wrote:
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??
Yes - You can set the output stream format of an AudioDevice (which
you can get from the OutputUnit.getProperty call) and it will set
the device - but you have to work within the stream formats that
the device supports - have a look at the device in Daisy and you'll
see the formats that the EMI can be put to - you can also query the
AudioDevice object (which Daisy does) to get the list of formats
the device supports.
Bill
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
Cat: "Leave me alone, I'm trying to nap... Ah, What's that clicking
noise?"
__________________________________________________________________________