mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibWeb: Implement BaseAudioContext.createOscillator
Which currently will always throw an exception as it is unimplemented under the hood - but this gives all of the plumbing we need in order to create a oscillator node as used in the reduced turnstyle testcase.
This commit is contained in:
committed by
Andreas Kling
parent
a83f4216a5
commit
1678f43c38
@@ -9,6 +9,7 @@
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/WebAudio/BaseAudioContext.h>
|
||||
#include <LibWeb/WebAudio/OscillatorNode.h>
|
||||
|
||||
namespace Web::WebAudio {
|
||||
|
||||
@@ -35,6 +36,13 @@ WebIDL::CallbackType* BaseAudioContext::onstatechange()
|
||||
return event_handler_attribute(HTML::EventNames::statechange);
|
||||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createoscillator
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<OscillatorNode>> BaseAudioContext::create_oscillator()
|
||||
{
|
||||
// Factory method for an OscillatorNode.
|
||||
return OscillatorNode::create(realm(), *this);
|
||||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffer
|
||||
WebIDL::ExceptionOr<void> BaseAudioContext::verify_audio_options_inside_nominal_range(JS::Realm& realm, WebIDL::UnsignedLong number_of_channels, WebIDL::UnsignedLong length, float sample_rate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user