mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 23:57:25 +00:00
LibWeb/WebAudio: Implement automation rate constraints
Some nodes have parameters whose automation rate is not allowed to be changed. This change enforces that constraint for all parameters it applies to.
This commit is contained in:
committed by
Andreas Kling
parent
575edf8a90
commit
c87f80454b
@@ -41,11 +41,11 @@ WebIDL::ExceptionOr<GC::Ref<DynamicsCompressorNode>> DynamicsCompressorNode::con
|
||||
|
||||
DynamicsCompressorNode::DynamicsCompressorNode(JS::Realm& realm, GC::Ref<BaseAudioContext> context, DynamicsCompressorOptions const& options)
|
||||
: AudioNode(realm, context)
|
||||
, m_threshold(AudioParam::create(realm, context, options.threshold, -100, 0, Bindings::AutomationRate::KRate))
|
||||
, m_knee(AudioParam::create(realm, context, options.knee, 0, 40, Bindings::AutomationRate::KRate))
|
||||
, m_ratio(AudioParam::create(realm, context, options.ratio, 1, 20, Bindings::AutomationRate::KRate))
|
||||
, m_attack(AudioParam::create(realm, context, options.attack, 0, 1, Bindings::AutomationRate::KRate))
|
||||
, m_release(AudioParam::create(realm, context, options.release, 0, 1, Bindings::AutomationRate::KRate))
|
||||
, m_threshold(AudioParam::create(realm, context, options.threshold, -100, 0, Bindings::AutomationRate::KRate, AudioParam::FixedAutomationRate::Yes))
|
||||
, m_knee(AudioParam::create(realm, context, options.knee, 0, 40, Bindings::AutomationRate::KRate, AudioParam::FixedAutomationRate::Yes))
|
||||
, m_ratio(AudioParam::create(realm, context, options.ratio, 1, 20, Bindings::AutomationRate::KRate, AudioParam::FixedAutomationRate::Yes))
|
||||
, m_attack(AudioParam::create(realm, context, options.attack, 0, 1, Bindings::AutomationRate::KRate, AudioParam::FixedAutomationRate::Yes))
|
||||
, m_release(AudioParam::create(realm, context, options.release, 0, 1, Bindings::AutomationRate::KRate, AudioParam::FixedAutomationRate::Yes))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user