LibWeb: Add ChannelMergerNode interface

This commit is contained in:
Jelle Raaijmakers 2024-11-25 14:30:36 +01:00 committed by Andreas Kling
commit be3a941f44
Notes: github-actions[bot] 2024-11-25 16:17:02 +00:00
10 changed files with 144 additions and 1 deletions

View file

@ -16,6 +16,7 @@
#include <LibWeb/WebAudio/AudioDestinationNode.h>
#include <LibWeb/WebAudio/BaseAudioContext.h>
#include <LibWeb/WebAudio/BiquadFilterNode.h>
#include <LibWeb/WebAudio/ChannelMergerNode.h>
#include <LibWeb/WebAudio/DynamicsCompressorNode.h>
#include <LibWeb/WebAudio/GainNode.h>
#include <LibWeb/WebAudio/OscillatorNode.h>
@ -80,6 +81,15 @@ WebIDL::ExceptionOr<GC::Ref<AudioBufferSourceNode>> BaseAudioContext::create_buf
return AudioBufferSourceNode::create(realm(), *this);
}
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createchannelmerger
WebIDL::ExceptionOr<GC::Ref<ChannelMergerNode>> BaseAudioContext::create_channel_merger(WebIDL::UnsignedLong number_of_inputs)
{
ChannelMergerOptions options;
options.number_of_inputs = number_of_inputs;
return ChannelMergerNode::create(realm(), *this, options);
}
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createoscillator
WebIDL::ExceptionOr<GC::Ref<OscillatorNode>> BaseAudioContext::create_oscillator()
{