mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibWeb: Initialize OfflineAudioContext
with correct defaults
This commit is contained in:
parent
2cac0dc20c
commit
27dbe49f00
Notes:
github-actions[bot]
2025-01-08 11:25:09 +00:00
Author: https://github.com/tcl3
Commit: 27dbe49f00
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3175
Reviewed-by: https://github.com/AtkinsSJ ✅
11 changed files with 288 additions and 22 deletions
|
@ -11,6 +11,7 @@
|
|||
#include <LibWeb/HTML/Scripting/TemporaryExecutionContext.h>
|
||||
#include <LibWeb/HTML/Window.h>
|
||||
#include <LibWeb/WebAudio/AudioContext.h>
|
||||
#include <LibWeb/WebAudio/AudioDestinationNode.h>
|
||||
#include <LibWeb/WebIDL/Promise.h>
|
||||
|
||||
namespace Web::WebAudio {
|
||||
|
@ -20,7 +21,9 @@ GC_DEFINE_ALLOCATOR(AudioContext);
|
|||
// https://webaudio.github.io/web-audio-api/#dom-audiocontext-audiocontext
|
||||
WebIDL::ExceptionOr<GC::Ref<AudioContext>> AudioContext::construct_impl(JS::Realm& realm, AudioContextOptions const& context_options)
|
||||
{
|
||||
return realm.create<AudioContext>(realm, context_options);
|
||||
auto context = realm.create<AudioContext>(realm, context_options);
|
||||
context->m_destination = TRY(AudioDestinationNode::construct_impl(realm, context));
|
||||
return context;
|
||||
}
|
||||
|
||||
AudioContext::AudioContext(JS::Realm& realm, AudioContextOptions const& context_options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue