LibWeb: Add BaseAudioContext.create_periodic_wave() factory method

This commit is contained in:
Tim Ledbetter 2025-01-02 12:40:56 +00:00 committed by Andreas Kling
commit a6f04506e4
Notes: github-actions[bot] 2025-01-03 13:55:11 +00:00
5 changed files with 179 additions and 1 deletions

View file

@ -15,6 +15,7 @@
#include <LibWeb/WebAudio/ChannelMergerNode.h>
#include <LibWeb/WebAudio/ChannelSplitterNode.h>
#include <LibWeb/WebAudio/ConstantSourceNode.h>
#include <LibWeb/WebAudio/PeriodicWave.h>
#include <LibWeb/WebIDL/Types.h>
namespace Web::WebAudio {
@ -67,6 +68,7 @@ public:
WebIDL::ExceptionOr<GC::Ref<DynamicsCompressorNode>> create_dynamics_compressor();
WebIDL::ExceptionOr<GC::Ref<GainNode>> create_gain();
WebIDL::ExceptionOr<GC::Ref<PannerNode>> create_panner();
WebIDL::ExceptionOr<GC::Ref<PeriodicWave>> create_periodic_wave(Vector<float> const& real, Vector<float> const& imag, Optional<PeriodicWaveConstraints> const& constraints = {});
GC::Ref<WebIDL::Promise> decode_audio_data(GC::Root<WebIDL::BufferSource>, GC::Ptr<WebIDL::CallbackType>, GC::Ptr<WebIDL::CallbackType>);