• 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: Channel Maps and HALOutputUnit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Channel Maps and HALOutputUnit


  • Subject: Re: Channel Maps and HALOutputUnit
  • From: James Coker <email@hidden>
  • Date: Wed, 11 Feb 2004 12:17:04 -0700

You have to set the property first based on the number of channels. I use
the StreamFormat to get the number of channels, seems to work fine:

// get stream format for output buss
size = sizeof(streamDesc);
osStatus = AudioUnitGetProperty(_halOutputUnit,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Output,
0,
&streamDesc,
&size );
_numOutputs = (unsigned int)streamDesc.mChannelsPerFrame;
printf("### hal out num output channels for stream 1: %u status: %d\n",
(unsigned int)_numOutputs, (int)osStatus);

// Setup Channel Map
printf("setup ch map: %d channels\n", (int)_numOutputs);
_outputChannelMap = malloc(sizeof(SInt32) * _numOutputs);
for(j = 0; j < _numOutputs; j++) {
_outputChannelMap[j] = j;
}

printf("..sizeof map: %u\n", (unsigned int)sizeof(_outputChannelMap));

osStatus = AudioUnitSetProperty(_halOutputUnit,
kAudioOutputUnitProperty_ChannelMap,
kAudioUnitScope_Global,
0,
_outputChannelMap,
(sizeof(SInt32) * _numOutputs));


On Feb 11, 2004, at 11:32 AM, Robert Grant wrote:

I'm probably doing something wrong but trying to get info on kAudioOutputUnitProperty_ChannelMap returns the kAudioUnitErr_PropertyNotInUse error.

I thought all HALOutputUnits had this property set?

Thanks for any insight,

Robert.
_______________________________________________
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.
_______________________________________________
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: 
 >Channel Maps and HALOutputUnit (From: Robert Grant <email@hidden>)
 >Re: Channel Maps and HALOutputUnit (From: Aaron Eppolito <email@hidden>)
 >Re: Channel Maps and HALOutputUnit (From: Robert Grant <email@hidden>)
 >Re: Channel Maps and HALOutputUnit (From: William Stewart <email@hidden>)
 >Re: Channel Maps and HALOutputUnit (From: Robert Grant <email@hidden>)

  • Prev by Date: Re: Channel Maps and HALOutputUnit
  • Next by Date: finding midi device Endpoints by External Devices names?
  • Previous by thread: Re: Channel Maps and HALOutputUnit
  • Next by thread: Re: Channel Maps and HALOutputUnit
  • Index(es):
    • Date
    • Thread