• 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: HALOutputUnit (Pt 2)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HALOutputUnit (Pt 2)


  • Subject: Re: HALOutputUnit (Pt 2)
  • From: Bob Stuller <email@hidden>
  • Date: Mon, 23 Feb 2004 15:49:14 -0500

Doug, Greetings!

At 11:55 AM -0800 2/23/04, Doug Wyatt wrote:
On Feb 23, 2004, at 11:02, Bob Stuller wrote:
But when I call this:
status = AudioUnitSetProperty(mHALOutInstance, kAudioDevicePropertyStreamFormat,
kAudioUnitScope_Output,
kDeviceInputElement,
&mInputDesc.description,
sizeof(AudioStreamBasicDescription));
This returns 'kAudioDeviceUnsupportedFormatError'.

What exactly is the stream format you are setting?

I ask for the best match to this format:
inputDesc.description.mSampleRate = foundRate; // 16000.0 if the device supports it.
inputDesc.description.mFormatID = kAudioFormatLinearPCM;
inputDesc.description.mFormatFlags = kLinearPCMFormatFlagIsBigEndian
| kLinearPCMFormatFlagIsSignedInteger
| kLinearPCMFormatFlagIsPacked
| kLinearPCMFormatFlagIsNonInterleaved;
inputDesc.description.mChannelsPerFrame = 1;
inputDesc.description.mBitsPerChannel = 16;
propertySize = sizeof(AudioStreamBasicDescription);
status = AudioDeviceGetProperty(deviceIDs[i], 0, true,
kAudioDevicePropertyStreamFormatMatch,
&propertySize, &inputDesc.description);

I get, typically:
inputDesc.description.mSampleRate == 16000.0
inputDesc.description.mFormatID == kAudioFormatLinearPCM
inputDesc.description.mFormatFlags == kLinearPCMFormatFlagIsBigEndian
| kAudioFormatFlagIsFloat
| kLinearPCMFormatFlagIsPacked
inputDesc.description.mChannelsPerFrame == 2
inputDesc.description.mBitsPerChannel == 32
which is what I pass in.

Peace,
Bob
--

It's Great to be Green!
http://www.greenpartyus.org/
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: HALOutputUnit (Pt 2)
      • From: Doug Wyatt <email@hidden>
References: 
 >Re: HALOutputUnit (Pt 2) (From: Bob Stuller <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Doug Wyatt <email@hidden>)

  • Prev by Date: Re: AudioUnit Effect: undefined symbols
  • Next by Date: Changing the latency from within the render callback.
  • Previous by thread: Re: HALOutputUnit (Pt 2)
  • Next by thread: Re: HALOutputUnit (Pt 2)
  • Index(es):
    • Date
    • Thread