[Bug 644945] Gstreamer audio synchronization fails at low latency.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jul 23 08:33:07 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=644945
  GStreamer | gst-plugins-base | 0.10.32

--- Comment #6 from Blaise Gassend <blaise at suitabletech.com> 2013-07-23 15:33:03 UTC ---
If I believe the initial comment I wrote, the problem was that alsa was willing
to buffer a lot more data than gstreamer was anticipating. Alsa wasn't asking
for data when it was needed, it was asking for as much data as it could put in
its multi-second (if I recall correctly) buffer. The data was being requested
long before gstreamer was getting it, gstreamer was assuming that Alsa would
only buffer 10ms, so gstreamer was reading from a place in the ring buffer that
would only get filled much later, and that was hence full of zeros. Thus, no
sound was coming out.

You should note that alsasink uses the snd_pcm_writei API for sending data to
the device, and snd_pcm_wait to wait for free space. If the audio device's
buffer is larger than gstreamer expects, snd_pcm_wait could return long before
the device actually needs data, and long before the data is actually available.
In that case, I stand by my opinion that waiting is the right thing to do.

I'm sure that I investigated why alsa's buffer was so large at the time, but
I'm afraid I don't recall the details. The only thing that I'm sure of is that
it was very hardware dependent and unpredictable. And if you happen to be using
dmix, or alsa going via pulse you're really in for a mess.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list