mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +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
|
@ -21,6 +21,7 @@ namespace Web::WebAudio {
|
|||
|
||||
BaseAudioContext::BaseAudioContext(JS::Realm& realm, float sample_rate)
|
||||
: DOM::EventTarget(realm)
|
||||
, m_destination(AudioDestinationNode::construct_impl(realm, *this))
|
||||
, m_sample_rate(sample_rate)
|
||||
{
|
||||
}
|
||||
|
@ -39,18 +40,6 @@ void BaseAudioContext::visit_edges(Cell::Visitor& visitor)
|
|||
visitor.visit(m_destination);
|
||||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-destination
|
||||
JS::NonnullGCPtr<AudioDestinationNode> BaseAudioContext::destination()
|
||||
{
|
||||
auto& realm = this->realm();
|
||||
|
||||
dbgln("FIXME: Properly implement BaseAudioContext::destination");
|
||||
|
||||
if (!m_destination)
|
||||
m_destination = realm.heap().allocate<AudioDestinationNode>(realm, realm, *this);
|
||||
return *m_destination;
|
||||
}
|
||||
|
||||
void BaseAudioContext::set_onstatechange(WebIDL::CallbackType* event_handler)
|
||||
{
|
||||
set_event_handler_attribute(HTML::EventNames::statechange, event_handler);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue