Created attachment 8590748 [details] [diff] [review] mc_wrpos.diff AFAICS, the sndio_stream_get_latency() function reports the time (expressed in number of samples) it take the last sample submitted to the device to reach the user's ears. This is the number of samples played (s->rdpos in the code) minus the number of samples submitted (s->wrpos, in the code). But the s->wrpos counter is set to zero, instead of being increased after each call to sio_write(). The diff fixes this. As sio_write() reports bytes (sample may be partially written), we have to switch s->rdpos and s->wrpos to use bytes. Tested on OpenBSD/amd64
Alex, is this patch still valid ? If so i can do the hg plumbing to get it commited.. at least it still applies.
sure it's still valid.
matthew, since it's a libcubeb patch, what do you prefer ? a github pull request and a backport/cubeb upgrade in m-i, or a patch to review for m-i and you'll take care of commiting it to github ? same question for #1153151.
(In reply to Landry Breuil (:gaston) from comment #3) > matthew, since it's a libcubeb patch, what do you prefer ? a github pull > request and a backport/cubeb upgrade in m-i, or a patch to review for m-i > and you'll take care of commiting it to github ? same question for #1153151. A pull request on GitHub and then an update of the in-tree version using media/libcubeb/update.sh is the preferred approach. Note that the last pending libcubeb update is slightly blocked right now: see bug 1251502.