Re: Latency
Re: Latency
- Subject: Re: Latency
- From: Gregory Wieber <email@hidden>
- Date: Tue, 28 Dec 2010 17:12:19 -0800
For the sake of anyone else who may be wondering how to do this, I believe I've found the correct way to determine latency on iOS -- it's the sum of
kAudioSessionProperty_PreferredHardwareSampleRate + kAudioSessionProperty_PreferredHardwareIOBufferDuration.
In my particular app, each Audio Unit adds zero time to the total latency, but I don't know if this would be true under other circumstances, so if you're trying to determine an accurate latency in time, you probably want to add in the latency of each Audio Unit as well...
Now that I've got notes scheduled at the correct time, I'm moving on to the second part of my problem, which is a subtle perceptible 'jitter' in the MIDI notes that are being sent out.
On Tue, Dec 28, 2010 at 4:39 PM, Gregory Wieber
<email@hidden> wrote:
When I first started researching this issue, I may have become attached to the notion of asking the audio unit for its latency, do to the existence of the prestantionLatency property -- which I later realized was OS X only. My earlier discovery of the presentationLatency property may have biased me to believing that the Audio Units held the correct information, and I completely ignored anything to do with the Audio Session...
Taking another look, I just realized that the audio session has a CurrentHardwareOutputLatency property, and I'm going to explore that and see if I can get somewhere.
On Tue, Dec 28, 2010 at 4:30 PM, Gregory Wieber
<email@hidden> wrote:
Final delivery is through a RemoteIO Audio Unit -- which, if my understanding is correct, is the closest thing we have to the HAL on iOS...
I understand that those numbers are likely correct, I was just being thorough.
On Tue, Dec 28, 2010 at 4:26 PM, Paul Davis
<email@hidden> wrote:
On Tue, Dec 28, 2010 at 7:18 PM, Gregory Wieber <
email@hidden> wrote:
> Ok, so no luck. First, kAudioUnitProperty_PresentationLatency is Mac OS
> X only. Second, kAudioUnitProperty_Latency keeps returning 0.
why do you not believe the value returned? the number is per-AU, and
there's no particular reason why the AUs you've mentioned would add
any latency to the signal pathway ....
the real latency numbers that you appear to need are from the HAL. how
are you arranging for final delivery to the audio h/w?
_______________________________________________
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