• 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: Opinions sought: AudioUnit Rendering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opinions sought: AudioUnit Rendering


  • Subject: Re: Opinions sought: AudioUnit Rendering
  • From: Doug Wyatt <email@hidden>
  • Date: Wed, 6 Mar 2002 06:57:32 -0800

This is a very promising idea -- we could have AudioToolbox export two globals:

extern const Float32 *kAudioToolbox_SilentBuffer;
extern const UInt32 kAudioToolbox_SilentBufferNumberSamples; // number of samples in kAudioToolbox_SilentBuffer

and AudioUnits' RenderSlice methods would be free to compare incoming AudioBuffer.mData's against it, and set outgoing mData's to it (as long as they were outputting fewer than kAudioToolbox_SilentBufferNumberSamples). Totally backward-compatible, a minimal API addition, and allows a good optimization.

Thanks!

Doug


On Tuesday, March 5, 2002, at 10:14 , James McCartney wrote:
In SuperCollider v1 I had this case and I don't know if it can be applied to
AudioUnits, but I passed a pointer to a globally known constant buffer of
zeroes. Dumb units can just process this as a normal buffer of zeroes.
Others can be smart and check if the pointer is the buffer-of-zeroes pointer
and if so, ignore it.
This trick relies on a number of things: buffers are a constant size, units
only read inputs and do not mix into them in place (so that it remains a
buffer of zeroes).

(strange, I did not receive the original post and had to go to the archives
to read it.. maybe I just got happy with the 'D' key in Pine without
looking..)
--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden http://www.sonosphere.com

"Premature optimization is the root of all evil."
-- Knuth
_______________________________________________
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: Opinions sought: AudioUnit Rendering
      • From: Kurt Bigler <email@hidden>
References: 
 >Re: Opinions sought: AudioUnit Rendering (From: James McCartney <email@hidden>)

  • Prev by Date: Re: MIDI and Sleep
  • Next by Date: RE: Opinions sought: AudioUnit Rendering
  • Previous by thread: Re: Opinions sought: AudioUnit Rendering
  • Next by thread: Re: Opinions sought: AudioUnit Rendering
  • Index(es):
    • Date
    • Thread