mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00:00
LibWeb: Implement AudioListener
This exposes BaseAudioContext.listener, which is a container for parameters related to the configuration of an actual "listener" in 3D space.
This commit is contained in:
parent
eeee6ba3f5
commit
2a98f2a12d
Notes:
github-actions[bot]
2024-10-18 07:40:03 +00:00
Author: https://github.com/gmta
Commit: 2a98f2a12d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1844
Reviewed-by: https://github.com/shannonbooth ✅
15 changed files with 228 additions and 1 deletions
|
@ -28,6 +28,7 @@ BaseAudioContext::BaseAudioContext(JS::Realm& realm, float sample_rate)
|
|||
: DOM::EventTarget(realm)
|
||||
, m_destination(AudioDestinationNode::construct_impl(realm, *this))
|
||||
, m_sample_rate(sample_rate)
|
||||
, m_listener(AudioListener::create(realm))
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -44,6 +45,7 @@ void BaseAudioContext::visit_edges(Cell::Visitor& visitor)
|
|||
Base::visit_edges(visitor);
|
||||
visitor.visit(m_destination);
|
||||
visitor.visit(m_pending_promises);
|
||||
visitor.visit(m_listener);
|
||||
}
|
||||
|
||||
void BaseAudioContext::set_onstatechange(WebIDL::CallbackType* event_handler)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue