mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
LibWeb: Add BaseAudioContext.createConstantSource() factory method
This commit is contained in:
parent
1b160044c4
commit
6cab972248
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <LibWeb/WebAudio/BiquadFilterNode.h>
|
||||
#include <LibWeb/WebAudio/ChannelMergerNode.h>
|
||||
#include <LibWeb/WebAudio/ChannelSplitterNode.h>
|
||||
#include <LibWeb/WebAudio/ConstantSourceNode.h>
|
||||
#include <LibWeb/WebIDL/Types.h>
|
||||
|
||||
namespace Web::WebAudio {
|
||||
|
|
@ -60,6 +61,7 @@ public:
|
|||
WebIDL::ExceptionOr<GC::Ref<AudioBuffer>> create_buffer(WebIDL::UnsignedLong number_of_channels, WebIDL::UnsignedLong length, float sample_rate);
|
||||
WebIDL::ExceptionOr<GC::Ref<AudioBufferSourceNode>> create_buffer_source();
|
||||
WebIDL::ExceptionOr<GC::Ref<ChannelMergerNode>> create_channel_merger(WebIDL::UnsignedLong number_of_inputs);
|
||||
WebIDL::ExceptionOr<GC::Ref<ConstantSourceNode>> create_constant_source();
|
||||
WebIDL::ExceptionOr<GC::Ref<ChannelSplitterNode>> create_channel_splitter(WebIDL::UnsignedLong number_of_outputs);
|
||||
WebIDL::ExceptionOr<GC::Ref<OscillatorNode>> create_oscillator();
|
||||
WebIDL::ExceptionOr<GC::Ref<DynamicsCompressorNode>> create_dynamics_compressor();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ interface BaseAudioContext : EventTarget {
|
|||
AudioBufferSourceNode createBufferSource ();
|
||||
ChannelMergerNode createChannelMerger (optional unsigned long numberOfInputs = 6);
|
||||
ChannelSplitterNode createChannelSplitter (optional unsigned long numberOfOutputs = 6);
|
||||
[FIXME] ConstantSourceNode createConstantSource ();
|
||||
ConstantSourceNode createConstantSource ();
|
||||
[FIXME] ConvolverNode createConvolver ();
|
||||
[FIXME] DelayNode createDelay (optional double maxDelayTime = 1.0);
|
||||
DynamicsCompressorNode createDynamicsCompressor();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user