GNOME Bugzilla – Bug 748289
audio: "delay" virt-func mixes up samples and frames
Last modified: 2015-04-27 08:15:07 UTC
Looking at GstAudioSinkClass, the 'delay' virtual function is documented as: "Return how many samples are still in the device. This is used to drive the synchronisation." However, discussion on #gstreamer revealed that actually, it needs the number of _frames_, not samples. Seems that at least gstsunosxsink.c, oss4-sink.c and gstdirectsoundsink.c follow the documentation and return the number of samples; alsa-sink returns the number of frames.
commit 531b9ba951129a5452e40043d729960c7ce71cb4 Author: Sebastian Dröge <sebastian@centricular.com> Date: Sun Apr 26 21:08:14 2015 +0200 audio: The delay vfunc returns the number of frames, not samples https://bugzilla.gnome.org/show_bug.cgi?id=748289
Ah, thank you for handling this so quickly! Note that there two mentions of 'sample' left that show up in the generated docs: http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/audio/gstaudiosink.c#n50 * <listitem><para>Get the number of samples written but not yet played * by the device.</para></listitem> http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/gst-libs/gst/audio/gstaudiosink.h#n91 /* get number of samples queued in the device */
Thanks, I missed those :) commit 9e480d11a2f3f7e9d7c5f63b883a68d62e6a4df3 Author: Sebastian Dröge <sebastian@centricular.com> Date: Mon Apr 27 10:08:17 2015 +0200 audio: Change the remaining "samples" in the ::delay() vfunc docs to "frames" https://bugzilla.gnome.org/show_bug.cgi?id=748289