mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-13 11:39:43 +00:00
WebAudio: Stub AudioDestinationContext
And expose it through `BaseAudioContext::destination`
This commit is contained in:
parent
9c17398429
commit
779e3072f9
Notes:
github-actions[bot]
2024-07-28 19:42:11 +00:00
Author: https://github.com/bbb651
Commit: 779e3072f9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/867
8 changed files with 34 additions and 19 deletions
|
@ -1,13 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
* Copyright (c) 2024, Bar Yemini <bar.ye651@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/AudioDestinationNodePrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/HTML/EventNames.h>
|
||||
#include <LibWeb/WebAudio/AudioDestinationNode.h>
|
||||
#include <LibWeb/WebAudio/AudioNode.h>
|
||||
#include <LibWeb/WebAudio/BaseAudioContext.h>
|
||||
|
||||
namespace Web::WebAudio {
|
||||
|
||||
|
@ -20,6 +22,18 @@ AudioDestinationNode::AudioDestinationNode(JS::Realm& realm, JS::NonnullGCPtr<Ba
|
|||
|
||||
AudioDestinationNode::~AudioDestinationNode() = default;
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-audiodestinationnode-maxchannelcount
|
||||
WebIDL::UnsignedLong AudioDestinationNode::max_channel_count()
|
||||
{
|
||||
dbgln("FIXME: Implement Audio::DestinationNode::max_channel_count()");
|
||||
return 2;
|
||||
}
|
||||
|
||||
JS::NonnullGCPtr<AudioDestinationNode> AudioDestinationNode::construct_impl(JS::Realm& realm, JS::NonnullGCPtr<BaseAudioContext> context)
|
||||
{
|
||||
return realm.heap().allocate<AudioDestinationNode>(realm, realm, context);
|
||||
}
|
||||
|
||||
void AudioDestinationNode::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue