GNOME Bugzilla – Bug 745078
osxaudio: AudioUnitGetProperty (..., kAudioUnitProperty_Latency, ...) takes time
Last modified: 2018-11-03 14:58:04 UTC
AudioUnitGetProperty (..., kAudioUnitProperty_Latency, ...) is showing up in the profiler as a time-waster. It doesn't actually change all that often, and can be detected with a property listener.
Created attachment 297752 [details] [review] Patch Trouble is, I don't see the latency *ever* changing from 0 on iOS. Maybe I should see how it goes on OS X. I think the patch is straightforward, but ... famous last words.
I do see a return value of 0 on AUHAL too. The latency property might only be meaningful for non-hardware AudioUnits, which do processing, and have an inherent latency. I'm looking for ways to query the underlying buffer size/fill level, since that's what we actually need.
For iOS, it might be sensible to use inputLatency and outputLatency from the AVAudioSession. https://developer.apple.com/library/ios/documentation/AVFoundation/Reference/AVAudioSession_ClassReference/index.html#//apple_ref/occ/instp/AVAudioSession/ For the HAL, I'm not sure what the right thing to do is. I do see a IO buffer size, as well as input and ouput latencies specified in the information page in HAL Lab. If we can't query actual fill levels but can use these, it might suffice for our purposes.
Are you still planning to work on this Ilya?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/162.