• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: USB multi-channel playback with AudioUnit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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?"
__________________________________________________________________________


  • Follow-Ups:
    • DefaultOutputDevice timestamps
      • From: email@hidden
References: 
 >USB multi-channel playback with AudioUnit (From: Christof Faller <email@hidden>)

  • Prev by Date: USB multi-channel playback with AudioUnit
  • Next by Date: Re: Change properties of an audio device which is associated with an AU
  • Previous by thread: Re: Change properties of an audio device which is associated with an AU
  • Next by thread: DefaultOutputDevice timestamps
  • Index(es):
    • Date
    • Thread