• 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: Audio Queue metronome
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Audio Queue metronome


  • Subject: Re: Audio Queue metronome
  • From: Evan Olcott <email@hidden>
  • Date: Wed, 30 Jun 2010 14:26:20 -0500

Coming from experience, this is not the way to write a metronome.

1. AudioQueues have an inherent latency of a full buffer length - at least. You're not going to be able to sync with the UI.
2. NSTimer is not guaranteed to be accurate enough for a metronome
3. Polling is too CPU-intensive for this task (in general polling is not good. "notifications" are better.)

You want to use the AUGraph system along with the hardware sample rate to decide where to put your click sounds in the render buffers. That's the most accurate way to do it. Also be aware of thread decoupling when you want drawing to "sync up" with your audio.

Ev
Senior Software Architect
Audiofile Engineering

http://www.audiofile-engineering.com/








 _______________________________________________
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: Audio Queue metronome
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Audio Queue metronome
  • Next by Date: Re: Audio Queue metronome
  • Previous by thread: Re: Audio Queue metronome
  • Next by thread: Re: Audio Queue metronome
  • Index(es):
    • Date
    • Thread