mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 21:12:08 +02:00
LibWeb: Implement BaseAudioContext.createGain
This commit is contained in:
committed by
Andreas Kling
parent
1fa7235fec
commit
6466fca20a
Notes:
sideshowbarker
2024-07-17 07:08:37 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/6466fca20a Pull-request: https://github.com/SerenityOS/serenity/pull/24471
23
Tests/LibWeb/Text/input/WebAudio/GainNode.html
Normal file
23
Tests/LibWeb/Text/input/WebAudio/GainNode.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
function dumpAudioParam(param) {
|
||||
println(`${param} current: ${param.value}, default: ${param.defaultValue}, min: ${param.minValue}, max: ${param.maxValue}, rate: ${param.automationRate}`);
|
||||
}
|
||||
|
||||
test(() => {
|
||||
const audioContext = new OfflineAudioContext(1, 5000, 44100);
|
||||
|
||||
const node = audioContext.createGain();
|
||||
|
||||
// Check prototype
|
||||
let prototype = Object.getPrototypeOf(node);
|
||||
|
||||
while (prototype) {
|
||||
println(prototype.constructor.name);
|
||||
prototype = Object.getPrototypeOf(prototype);
|
||||
}
|
||||
|
||||
// Audio Params
|
||||
dumpAudioParam(node.gain);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user