• 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
My AUHAL Output Audio Unit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

My AUHAL Output Audio Unit


  • Subject: My AUHAL Output Audio Unit
  • From: Daniel Todd Currie <email@hidden>
  • Date: Thu, 24 Jun 2004 23:29:20 -0700

I've just finished implementing my AUHAL Output Audio Unit according to the sample code and docs available here:

http://developer.apple.com/technotes/tn2002/tn2091.html

I run it and look at the buffer data that comes pouring into my app and it is just a big long list of zeros. :(

I have no idea where to begin troubleshooting, as the AU setup sample code seems pretty thorough and I have checked for all of the ComponentResult errors in my AudioUnitSetProperty calls. I was a bit perplexed by one of the listings in the link above, so I wonder if it could be the problem. The block of code from that page:

SInt32 *channelMap =NULL;
UInt32 numOfChannels = DesiredFormat.mChannelsPerFrame; //2 channels
UInt32 mapSize = numOfChannels *sizeof(SInt32);
channelMap = (SInt32 *)malloc(size);

//for each channel of desired input, map the channel from
//the device's output channel.
for(UInt32 i=0;i<numOfChannels;i++)
{
channelMap[i]=-1;
}
//channelMap[desiredInputChannel] = deviceOutputChannel;
channelMap[0] = 2;
channelMap[1] = 3;
AudioUnitSetProperty(InputUnit, kAudioOutputUnitProperty_ChannelMap, kAudioUnitScope_Output, 1, channelMap, size);

Aside from what seems like a typo where "size" is used instead of "mapSize", I don't understand why channelMap elements are set once in the for loop, and then once again after the for loop. I implemented the AU for my own needs as best I could from this example, but it makes sense that if I were somehow mapping the channels incorrectly I might get a bunch of silence. Can anyone shed a little light on the snippet above?

Thanks a million,

-- Daniel Todd Currie
_______________________________________________
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: My AUHAL Output Audio Unit
      • From: Doug Wyatt <email@hidden>
    • Re: My AUHAL Output Audio Unit
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Documentation?
  • Next by Date: Re: Process and Render
  • Previous by thread: end playback coreaudio
  • Next by thread: Re: My AUHAL Output Audio Unit
  • Index(es):
    • Date
    • Thread