• 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
AU Render() and multi-out MusicDevice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AU Render() and multi-out MusicDevice


  • Subject: AU Render() and multi-out MusicDevice
  • From: Malcolm Haylock <email@hidden>
  • Date: Thu, 30 Sep 2004 16:48:18 +0100

Hi All,

I'm having troubles with a prerelease of a popular AU host and an 8-out AU instrument.

A simple Render routine to create silence is as follows. Note that
fNumOutputs is 8.

ComponentResult xxx::Render(
AudioUnitRenderActionFlags& ioActionFlags,
const AudioTimeStamp& inTimeStamp,
UInt32 sampleFrames )
{
 float* outs[fNumOutputs];

 // Get output buffer list and extract the i/o buffer pointers.
 if (fNumOutputs>0)
 {
  AudioBufferList& asOutBufs=GetOutput(0)->GetBufferList();
  for (long o=0; o<fNumOutputs; ++o){
   outs[o]=(float*)(asOutBufs.mBuffers[o].mData);
   if(asOutBufs.mBuffers[o].mDataByteSize<=0 || o>=asOutBufs.mNumberBuffers)
    outs[o]=nil;
  }
 }

 // silence
 for (long o=0; o<fNumOutputs; ++o)
 if(outs[o])
  memset(outs[o], 0, sizeof(float)*sampleFrames);

 return noErr;
}

Under a pevious version of the host all works fine, with asOutBufs.mNumberBuffers=8. Under the latest version asOutBufs.mNumberBuffers=2. Therefore the above code does nothing
to the other 6 channels resulting in noise on these channels.


Please let me know if anything is wrong with my methodology above.

Thanks,
Malcolm Haylock
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: AU Render() and multi-out MusicDevice
      • From: William Stewart <email@hidden>
    • Re: AU Render() and multi-out MusicDevice
      • From: David Duncan <email@hidden>
    • De-interleave AudioUnit
      • From: Ethan Funk <email@hidden>
  • Prev by Date: Re: Logic 7 shipping now
  • Next by Date: De-interleave AudioUnit
  • Previous by thread: Re: How to monitor what is being recorded?
  • Next by thread: De-interleave AudioUnit
  • Index(es):
    • Date
    • Thread