Re: Audio Queue metronome
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