Rounding direction for `AudioData.duration`
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.3k
- Forks
- 194
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
See https://w3c.github.io/webcodecs/#ref-for-dom-audiodata-duration%E2%91%A1
Does this round or floor or ceil? If I follow Chromium's code correctly, it simply casts the double to an integer, resulting in a generally floored value. I think this is fine (it's bound to be losing precision anyway), but maybe we should spec it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the referenced WebCodecs specification section for AudioData.duration and compare its wording with the Chromium implementation mentioned in the issue. Clarify whether the conversion rounds, floors, or ceils, then update the specification so the behavior is explicit and verify the resulting wording against the implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api, audio-video-rtc
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100