[Bug 744922] osxaudiosrc: iOS resampling is stuttering

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Feb 23 17:27:04 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=744922

--- Comment #7 from Ilya Konstantinov <ilya.konstantinov at gmail.com> ---
(In reply to Arun Raghavan from comment #5)
> If the only thing that changes between calls is mDataByteSize, would it not
> be sufficient to just reset it each time we get the callback, before calling
> AudioUnitRender()?

>From the standpoint of keeping this patch smaller, it would be better.

>From the standpoint of keep the code nice, I disagree.

a) There's little to no performance incentive in keeping the AudioBufferList as
part of our heap structure as opposed to the function's stack. Initializing
this structure is quick, and it's just the scaffolding you need in order to
call AudioUnitRender. It's an O(1) structure. In a way, it's just like passing
arguments.

b) Keeping AudioBufferList between calls confuses the reader -- He'll be
wondering why the duplicity? Why does AudioBuffer contain mDataByteSize but
they're keeping a separate copy of it? In the end, it's a matter of code
documenting itself through common conventions. Remember that our code is, in a
way, documenting Core Audio to somebody who didn't read Apple's docs too
closely.

c) We're keeping the members on the heap in a non-Apple-y way, as something
obvious every audio developer should understand. Then we only use Apple-y
conventions right before calling Apple functions, so it's clear whom it serves.
If Apple chooses to "clobber" its own structure, it's an Apple-y problem. It
doesn't clobber *anything* on our GST side of things.

This was a long treatise over this patch, but I hope it was convincing :)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the gstreamer-bugs mailing list