Created attachment 79947 [details] Fix bugs in coreaudio latency calculation code Pulseaudio on OSX sometimes works and sometimes doesn't. When it works it usually takes a while before sound starts playing. A sound file might start playing after being stuck for a few minutes. I tracked this down to a bug in the coreaudio implementation: the get_latency_us function is buggy and uses an uninitialized variable as part of the calculation. Sometimes the resulting latency turns out low enough for it to play, sometimes not. The attached patch fixes the issue. It also fixes AudioObjectGetPropertyData calls that weren't working due to the wrong mScope and adds error logging.
Thank you! Patch applied: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=a0032eb7f9c8ef15b0f6cd97e5572d10fec86de7
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.