|
@@ -11,6 +11,7 @@
|
|
|
#include <LibWeb/WebAudio/AudioBuffer.h>
|
|
|
#include <LibWeb/WebAudio/BaseAudioContext.h>
|
|
|
#include <LibWeb/WebAudio/DynamicsCompressorNode.h>
|
|
|
+#include <LibWeb/WebAudio/GainNode.h>
|
|
|
#include <LibWeb/WebAudio/OscillatorNode.h>
|
|
|
|
|
|
namespace Web::WebAudio {
|
|
@@ -61,6 +62,13 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<DynamicsCompressorNode>> BaseAudioContext::
|
|
|
return DynamicsCompressorNode::create(realm(), *this);
|
|
|
}
|
|
|
|
|
|
+// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-creategain
|
|
|
+JS::NonnullGCPtr<GainNode> BaseAudioContext::create_gain()
|
|
|
+{
|
|
|
+ // Factory method for GainNode.
|
|
|
+ return GainNode::create(realm(), *this);
|
|
|
+}
|
|
|
+
|
|
|
// https://webaudio.github.io/web-audio-api/#dom-baseaudiocontext-createbuffer
|
|
|
WebIDL::ExceptionOr<void> BaseAudioContext::verify_audio_options_inside_nominal_range(JS::Realm& realm, WebIDL::UnsignedLong number_of_channels, WebIDL::UnsignedLong length, float sample_rate)
|
|
|
{
|