• 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: How to set buffer size for Audio Output Unit?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to set buffer size for Audio Output Unit?


  • Subject: Re: How to set buffer size for Audio Output Unit?
  • From: Christof Faller <email@hidden>
  • Date: Thu, 30 Aug 2001 06:55:04 -0400

Hi Roger,

Thanks for the advice. Currently I am doing something quite similar
to what you propose. To generate the samples in the larger buffer
I create a thread (NSThread). The AudioUnitCallback then simply
talkes the samples from this buffer and writes them into the small
supplied buffer.

There are two issues with this solution:
1
Larger than necessary delay (it really would be best if I could
match my algorithm framesize with the AudioOutputUnit
framesize.
2
NSThread has not enough priority. So if I do some other
processing on MacOS X while the audio is playing, it
occasionnally breaks (unless I choose a very large
buffer).

If the AudioOutputUnit uses such small buffers I can't generate
the samples from within the context of the AudioUnitCallback
because my algorithm
for generating the samples is computationnally quite complex.
And my frame-size is quite large (I generate 1024 samples at once).
Therefore the time-slice of the callback function (AudioUnitCallback)
is not large enough to do the real-time processing. However if I
could increase the AudioOutputUnit buffer size, I could also spend
more time in the callback function,

Chris


  • Follow-Ups:
    • Re: How to set buffer size for Audio Output Unit?
      • From: Chris Rogers <email@hidden>
References: 
 >RE: How to set buffer size for Audio Output Unit? (From: Roger Butler <email@hidden>)

  • Prev by Date: RE: How to set buffer size for Audio Output Unit?
  • Next by Date: AudioOutputUnit and its AudioDevice
  • Previous by thread: RE: How to set buffer size for Audio Output Unit?
  • Next by thread: Re: How to set buffer size for Audio Output Unit?
  • Index(es):
    • Date
    • Thread