mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibWeb: Add stub IDL interface for PeriodicWave
PeriodicWave represents an arbitrary periodic waveform to be used with an OscillatorNode.
This commit is contained in:
parent
5cb127819c
commit
b1b7e2324a
Notes:
sideshowbarker
2024-07-17 00:47:29 +09:00
Author: https://github.com/shannonbooth
Commit: b1b7e2324a
Pull-request: https://github.com/SerenityOS/serenity/pull/24143
7 changed files with 100 additions and 0 deletions
35
Userland/Libraries/LibWeb/WebAudio/PeriodicWave.cpp
Normal file
35
Userland/Libraries/LibWeb/WebAudio/PeriodicWave.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/PeriodicWavePrototype.h>
|
||||
#include <LibWeb/WebAudio/PeriodicWave.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::WebAudio {
|
||||
|
||||
JS_DEFINE_ALLOCATOR(PeriodicWave);
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-periodicwave-periodicwave
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<PeriodicWave>> PeriodicWave::construct_impl(JS::Realm& realm, JS::NonnullGCPtr<BaseAudioContext>, PeriodicWaveOptions const&)
|
||||
{
|
||||
return WebIDL::NotSupportedError::create(realm, "FIXME: Implement PeriodicWave::construct_impl"_fly_string);
|
||||
}
|
||||
|
||||
PeriodicWave::~PeriodicWave() = default;
|
||||
|
||||
void PeriodicWave::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(PeriodicWave);
|
||||
}
|
||||
|
||||
void PeriodicWave::visit_edges(Cell::Visitor& visitor)
|
||||
{
|
||||
Base::visit_edges(visitor);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue