mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb: Validate AudioParam context in AudioNode::connect()
An exception is now thown if an `AudioNode` attempts to connect to an `AudioParam` from a different `BaseAudioContext`.
This commit is contained in:
parent
2edd0812ca
commit
5c57acf140
Notes:
github-actions[bot]
2025-01-09 11:35:50 +00:00
Author: https://github.com/tcl3
Commit: 5c57acf140
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3191
Reviewed-by: https://github.com/shannonbooth ✅
14 changed files with 54 additions and 43 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, options.playback_rate, NumericLimits<float>::lowest(), NumericLimits<float>::max(), Bindings::AutomationRate::ARate))
|
||||
, m_detune(AudioParam::create(realm, options.detune, NumericLimits<float>::lowest(), NumericLimits<float>::max(), Bindings::AutomationRate::ARate))
|
||||
, m_playback_rate(AudioParam::create(realm, context, options.playback_rate, NumericLimits<float>::lowest(), NumericLimits<float>::max(), Bindings::AutomationRate::ARate))
|
||||
, m_detune(AudioParam::create(realm, context, options.detune, NumericLimits<float>::lowest(), NumericLimits<float>::max(), Bindings::AutomationRate::ARate))
|
||||
, 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