mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibWeb: Set OscillatorNode
type in the constructor
This commit is contained in:
parent
72818300c0
commit
acbae1b118
Notes:
github-actions[bot]
2025-01-04 10:13:31 +00:00
Author: https://github.com/tcl3
Commit: acbae1b118
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3122
Reviewed-by: https://github.com/shannonbooth ✅
1 changed files with 1 additions and 0 deletions
|
@ -43,6 +43,7 @@ WebIDL::ExceptionOr<GC::Ref<OscillatorNode>> OscillatorNode::construct_impl(JS::
|
||||||
|
|
||||||
OscillatorNode::OscillatorNode(JS::Realm& realm, GC::Ref<BaseAudioContext> context, OscillatorOptions const& options)
|
OscillatorNode::OscillatorNode(JS::Realm& realm, GC::Ref<BaseAudioContext> context, OscillatorOptions const& options)
|
||||||
: AudioScheduledSourceNode(realm, context)
|
: AudioScheduledSourceNode(realm, context)
|
||||||
|
, m_type(options.type)
|
||||||
, m_frequency(AudioParam::create(realm, options.frequency, -context->nyquist_frequency(), context->nyquist_frequency(), Bindings::AutomationRate::ARate))
|
, m_frequency(AudioParam::create(realm, options.frequency, -context->nyquist_frequency(), context->nyquist_frequency(), Bindings::AutomationRate::ARate))
|
||||||
, m_detune(AudioParam::create(realm, options.detune, -1200 * AK::log2(NumericLimits<float>::max()), 1200 * AK::log2(NumericLimits<float>::max()), Bindings::AutomationRate::ARate))
|
, m_detune(AudioParam::create(realm, options.detune, -1200 * AK::log2(NumericLimits<float>::max()), 1200 * AK::log2(NumericLimits<float>::max()), Bindings::AutomationRate::ARate))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue