LibWeb: Add BaseAudioContext.createConstantSource() factory method

This commit is contained in:
Tim Ledbetter 2025-01-02 10:25:21 +00:00 committed by Andreas Kling
commit 6cab972248
Notes: github-actions[bot] 2025-01-03 10:14:24 +00:00
3 changed files with 9 additions and 1 deletions

View file

@ -91,6 +91,12 @@ WebIDL::ExceptionOr<GC::Ref<ChannelMergerNode>> BaseAudioContext::create_channel
return ChannelMergerNode::create(realm(), *this, options);
}
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createconstantsource
WebIDL::ExceptionOr<GC::Ref<ConstantSourceNode>> BaseAudioContext::create_constant_source()
{
return ConstantSourceNode::create(realm(), *this);
}
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createchannelsplitter
WebIDL::ExceptionOr<GC::Ref<ChannelSplitterNode>> BaseAudioContext::create_channel_splitter(WebIDL::UnsignedLong number_of_outputs)
{