mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 09:18:52 +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:
parent
575edf8a90
commit
c87f80454b
Notes:
github-actions[bot]
2025-01-19 16:25:50 +00:00
Author: https://github.com/tcl3
Commit: c87f80454b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3301
6 changed files with 316 additions and 13 deletions
|
@ -18,8 +18,8 @@ GC_DEFINE_ALLOCATOR(AudioBufferSourceNode);
|
|||
AudioBufferSourceNode::AudioBufferSourceNode(JS::Realm& realm, GC::Ref<BaseAudioContext> context, AudioBufferSourceOptions const& options)
|
||||
: AudioScheduledSourceNode(realm, context)
|
||||
, m_buffer(options.buffer)
|
||||
, m_playback_rate(AudioParam::create(realm, context, options.playback_rate, NumericLimits<float>::lowest(), NumericLimits<float>::max(), Bindings::AutomationRate::KRate))
|
||||
, m_detune(AudioParam::create(realm, context, options.detune, NumericLimits<float>::lowest(), NumericLimits<float>::max(), Bindings::AutomationRate::KRate))
|
||||
, m_playback_rate(AudioParam::create(realm, context, options.playback_rate, NumericLimits<float>::lowest(), NumericLimits<float>::max(), Bindings::AutomationRate::KRate, AudioParam::FixedAutomationRate::Yes))
|
||||
, m_detune(AudioParam::create(realm, context, options.detune, NumericLimits<float>::lowest(), NumericLimits<float>::max(), Bindings::AutomationRate::KRate, AudioParam::FixedAutomationRate::Yes))
|
||||
, m_loop(options.loop)
|
||||
, m_loop_start(options.loop_start)
|
||||
, m_loop_end(options.loop_end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue