Closed Bug 1153179 Opened 9 years ago Closed 7 years ago

fix latency reporting in libcubeb sndio

Categories

(Core :: Audio/Video: cubeb, defect, P4)

x86_64
OpenBSD
defect

Tracking

()

RESOLVED FIXED
mozilla48

People

(Reporter: alex, Assigned: alex, Mentored)

References

Details

Attachments

(1 file)

Attached patch mc_wrpos.diffSplinter Review
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
Component: Audio/Video → Audio/Video: MSG/cubeb/GMP
Component: Audio/Video: MediaStreamGraph → Audio/Video: cubeb
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P4
Alex, is this patch still valid ? If so i can do the hg plumbing to get it commited.. at least it still applies.
Flags: needinfo?(alex)
sure it's still valid.
Flags: needinfo?(alex)
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.
Flags: needinfo?(kinetik)
(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.
Flags: needinfo?(kinetik)
https://hg.mozilla.org/mozilla-central/diff/54534d5c9382/media/libcubeb/src/cubeb_sndio.c
Assignee: nobody → alex
Blocks: 1251502
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: