osxaudio: fix latency property query on RemoteIO

AudioUnitGetProperty would fail with kParamErr (-50) every time,
simply because size wasn't initialized.

Now it returns zero latency, but at least it doesn't fail.

https://bugzilla.gnome.org/show_bug.cgi?id=750868
This commit is contained in:
Ilya Konstantinov 2015-06-12 19:21:10 +03:00 committed by Sebastian Dröge
parent 8e236fa2e1
commit f676079e95

View file

@ -64,7 +64,7 @@ gst_core_audio_get_samples_and_latency_impl (GstCoreAudio * core_audio,
gdouble rate, guint * samples, gdouble * latency)
{
OSStatus status;
UInt32 size;
UInt32 size = sizeof (double);
status = AudioUnitGetProperty (core_audio->audiounit, kAudioUnitProperty_Latency, kAudioUnitScope_Global, 0, /* N/A for global */
latency, &size);