[Bug 788362] directsoundsrc: provided clock is not monotonic after pause and resume

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Oct 11 14:01:51 UTC 2017


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

--- Comment #13 from Philippe Renon <philippe_renon at yahoo.fr> ---
Had a look at alsasink to see if it has the same issue as directsoundsink.
It does not but because, I believe, it's delay method is wrong.

Afaik, audio sink compute audio clock time by taking the number of samples sent
to the audio device and deduct from it how much remains to be played (as
reported by the audio device itself through the delay method).

So time = samples - delay.

The alsasink delay() method returns the value of snd_pcm_delay() which,
according to the documentation [1] is the intrinsic latency of the audio device
(i.e. how long  it takes for a first sample to become audible). I think it
should return the value of snd_pcm_avail() [2] which return the current fill
level of the device.

directsoundsink delay() method return how much sound remains to be played and
not the internal latency of the audio device (which is not available afaik).

I am not sure who is correct there, directsoundsink or alsasink ?

[1]
https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#ga012e8b999070e72ab23514f25e7d6482
[2]
https://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m.html#ga577b4d51e08d94930a05bbe73291ed2a

-- 
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