• 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: Thu, 26 Feb 2004 08:11:34 -0500

Bill, Greetings!

At 6:42 PM -0800 2/25/04, William Stewart wrote:
On 25/02/2004, at 6:20 PM, Bob Stuller wrote:
channelMapPtr[0] = 0;
for (long i = 1; i < nChannels; i++)
{
channelMapPtr[i] = -1;
}
status = AudioUnitSetProperty(mHALOutInstance,
kAudioOutputUnitProperty_ChannelMap,
kAudioUnitScope_Output,
kDeviceInputElement, channelMapPtr, sizeof(UInt32));

You only need to set the channel map if you want anything BUT the default mapping... The default mapping is this:
Device Channel Your Channel
1 1
2 2
etc....

'My Channel' is a one-based count now? In your 'HALOutputUnit (Pt 2)' tome, you wrote:
For e.g. We have a 6 channel output device, we have stereo source we
want to provide to the device, and we want that stereo source to go to
the 3rd and 4th channels of the device. The channel map will look like
this:

{ -1, -1, 0, 1, -1, -1 }
and that is why my code above (which seeks only mono audio) uses the zero in the array's zeroth place & -1 elsewhere.

The value of the flags should be zero thus:

AudioUnitRenderActionFlags flags = 0;
AudioUnitRender (unit, &flags, &timestamp, 1, numFrames, bufferlist);

You have been warned :)

Question: I just pass the same pointer that the callback gets as a parameter. Should I be sending in a pointer to zero? Will AudioUnitRender ever use this pointer to give feedback on its activities?

not a pointer to zero (char* ptr = 0!!!!) WRONG!!!! :)

Hey, I'm sorry for the bad terminology (again): 'pointer to zero' was shorthand for 'pointer to a local variable containing zero'. My real question: Was the intention here to clear any flags that the callback received?? Ultimately (soon), I'll be interested in knowing when a silent whack of samples comes through & it's unclear to me whether the AUHAL knows that already when it calls my callback or whether AudioUnitRender fills this in. It's also unclear whether 'silent' means absolute silence (all zeroes) or some threshold.

We're massaging this render flags param, so that's fine to just use the one we're passing you.

Part of the reason that I am asking all these [stupid, beating-a-half-dead-horse] questions (this won't surprise you) is in the hope that I can write it in a way that works today & works tomorrow. And I sincerely appreciate your patience in walking us through familiar territory.

Peace,
Bob
--

Compassion is the radicalism of this age.
- The Honorable Dalai Lama
_______________________________________________
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.


References: 
 >Re: HALOutputUnit (Pt 2) (From: Bob Stuller <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Doug Wyatt <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Bob Stuller <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Doug Wyatt <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Bob Stuller <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Doug Wyatt <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Bob Stuller <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Aaron Eppolito <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Bob Stuller <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Aaron Eppolito <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Bob Stuller <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Aaron Eppolito <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Bob Stuller <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Aaron Eppolito <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: William Stewart <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: Bob Stuller <email@hidden>)
 >Re: HALOutputUnit (Pt 2) (From: William Stewart <email@hidden>)

  • Prev by Date: kAudioUnitSubType_AUConverter
  • Next by Date: Re: HALOutputUnit (Pt 2)
  • Previous by thread: Re: HALOutputUnit (Pt 2)
  • Next by thread: Re: HALOutputUnit (Pt 2)
  • Index(es):
    • Date
    • Thread