Working with a new Apple AU (AUTimePitch - thank you Apple!!), and I'm trying to compensate for the latency the AU inherently has.
I ask for the latency property via:
Float32 latency; UInt32 dataSize = sizeof(latency); err = AudioUnitGetProperty(stretcherAudioUnit, kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0, & latency, &dataSize);
...to find that the value I get is a floating point number which varies every time, mostly at the 1.2 - 1.4 range.
I tried applying this number against the number of frames (256), but didn't really get a helpful number.
I want to skip over the "blank audio" at the top before I start putting my resulting AU output to my file, so a latency in terms of samples is what I'm looking for... how do I calculate it from this property, or is this the way to find the latency at all?
Ev Technical Knowledge Officer Head Programmer/Designer Audiofile Engineering
|