mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibWeb/WebAudio: Implement basic startRendering
Adds passing WPT. Does not handle actually rendering audio yet.
This commit is contained in:
committed by
Jelle Raaijmakers
parent
5abb5d555a
commit
01947ded23
Notes:
github-actions[bot]
2025-10-26 13:20:28 +00:00
Author: https://github.com/Prospero23 Commit: https://github.com/LadybirdBrowser/ladybird/commit/01947ded23b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6547 Reviewed-by: https://github.com/gmta ✅
@@ -1,11 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
|
||||
// Once the ctor‑offlineaudiocontext WPT test is updated to check
|
||||
// renderQuantumSize and renderSizeHint, this test is not needed.
|
||||
test(() => {
|
||||
asyncTest(async done => {
|
||||
// Once the ctor‑offlineaudiocontext WPT test is updated to check
|
||||
// renderQuantumSize and renderSizeHint, this test is not needed.
|
||||
const audioContext = new OfflineAudioContext(1, 1, 44100)
|
||||
println(`${audioContext.renderQuantumSize}`);
|
||||
|
||||
// Second call must reject with InvalidStateError
|
||||
await audioContext.startRendering();
|
||||
|
||||
try {
|
||||
await audioContext.startRendering();
|
||||
println('FAIL: started rendering on repeated call');
|
||||
} catch (e) {
|
||||
println(`${e}`);
|
||||
}
|
||||
|
||||
done();
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user