Fix/repair timeout wpt tests - #1248
Open
mdydek wants to merge 11 commits into
Open
Conversation
… overflow, onended)
Three root causes, measured on a full smoke run (2631/670 in 161s -> 2682/644
in 31s, no per-file regressions, all 13 harness-timeout files gone):
1. AudioParam automation boundaries landed one frame late. The a-rate loop
accumulated `time += 1/sampleRate` (ULP drift per quantum) and event times
were compared raw. Events now carry both frame-snapped times
(round(T*sampleRate), driving ordering and effect boundaries per the WPT
reference) and raw times (feeding interpolation, which the spec defines on
real times — audioparam-close.html schedules ramps inside a single frame);
a due event supersedes an unfinished ramp, and per-sample times are derived
as (quantumStartFrame + i) / sampleRate. dsp::timeToSampleFrame now rounds
half-up like Blink instead of truncating.
2. The 100-event WPT automation suites overflowed the 64-slot param event
queues; BoundedPriorityQueue::push silently drops when full, freezing
automation at event ~62. AUDIO_PARAM_MAX_QUEUED_EVENTS raised to 256 and
the memory-pressure estimate updated to model the queues.
3. WPT sets the spec-lowercase `src.onended` and uses
addEventListener('ended'); the TS layer only had camelCase onEnded, so the
assignments were dead expandos and four files waited forever. Added the
spec-name alias, EventTarget-style add/removeEventListener sharing one
native subscription, and a dispatched event shaped {type: 'ended', target}.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lmw8EDPFNAUqozoD4ho11o
… overflow, onended)
Three root causes, measured on a full smoke run (2631/670 in 161s -> 2682/644
in 31s, no per-file regressions, all 13 harness-timeout files gone):
1. AudioParam automation boundaries landed one frame late. The a-rate loop
accumulated `time += 1/sampleRate` (ULP drift per quantum) and event times
were compared raw. Events now carry both frame-snapped times
(round(T*sampleRate), driving ordering and effect boundaries per the WPT
reference) and raw times (feeding interpolation, which the spec defines on
real times — audioparam-close.html schedules ramps inside a single frame);
a due event supersedes an unfinished ramp, and per-sample times are derived
as (quantumStartFrame + i) / sampleRate. dsp::timeToSampleFrame now rounds
half-up like Blink instead of truncating.
2. The 100-event WPT automation suites overflowed the 64-slot param event
queues; BoundedPriorityQueue::push silently drops when full, freezing
automation at event ~62. AUDIO_PARAM_MAX_QUEUED_EVENTS raised to 256 and
the memory-pressure estimate updated to model the queues.
3. WPT sets the spec-lowercase `src.onended` and uses
addEventListener('ended'); the TS layer only had camelCase onEnded, so the
assignments were dead expandos and four files waited forever. Added the
spec-name alias, EventTarget-style add/removeEventListener sharing one
native subscription, and a dispatched event shaped {type: 'ended', target}.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lmw8EDPFNAUqozoD4ho11o
…tware-mansion/react-native-audio-api into fix/repair-timeout-wpt-tests
WPT non-regression comparisonPASS — no regressions · 3 improved section(s) · overall 2642 → 2684 (+42)
Unchanged sections (25)
Baseline: Workflow run · this comment is updated on every push. |
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.
Closes #
Introduced changes
Checklist