Fix bufferSource.loop = true on extreme edge case#476
Merged
Taym95 merged 2 commits intoservo:mainfrom Dec 9, 2025
Merged
Conversation
Taym95
commented
Dec 5, 2025
2e616cd to
21bf1f3
Compare
be31429 to
a0f2e9f
Compare
bufferSource.loop = true on extreme edge case
Signed-off-by: Taym Haddadi <[email protected]>
a0f2e9f to
0c43685
Compare
Signed-off-by: Taym Haddadi <[email protected]>
github-merge-queue bot
pushed a commit
to servo/servo
that referenced
this pull request
Dec 10, 2025
#41075) Fix in servo/media#476: Previously: the moment we set bufferSource.loop = true, the node hit the early “extreme edge case” check, decided “I refuse to output”, triggered onended, and returned silence. So the loop never got a chance to run. Now: Early bailout is removed(no idea why was there in first place). The per tick offset is guaranteed to be a sensible value with respect to the loop range (wrapped if extreme). The normal mixing code runs, updating pos each tick and respecting the loop region Testing: I tested this manually, it would be nice to add a test for it, and I’m surprised there isn’t one yet. Fixes: #41073 --------- Signed-off-by: Taym Haddadi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: servo/servo#41073
Previously:
the moment we set bufferSource.loop = true, the node hit the early “extreme edge case” check, decided “I refuse to output”, triggered onended, and returned silence. So the loop never got a chance to run.
Now: