diff options
author | Shamir Khodzha <khodzha.sh@gmail.com> | 2024-02-28 22:24:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 21:24:08 +0000 |
commit | 201cdbab17a450887867b7cb68f83b222099a5e2 (patch) | |
tree | c13587b8244270801631ebbdd9bee17e7ba3e087 /components/script/dom/oscillatornode.rs | |
parent | 5c87fe940e74c286d7b7d11257407e4a1ed1917f (diff) | |
download | servo-201cdbab17a450887867b7cb68f83b222099a5e2.tar.gz servo-201cdbab17a450887867b7cb68f83b222099a5e2.zip |
webaudio: Throw when setting invalid automationRate on AudioBufferSourceNode (#26469)
Diffstat (limited to 'components/script/dom/oscillatornode.rs')
-rw-r--r-- | components/script/dom/oscillatornode.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/oscillatornode.rs b/components/script/dom/oscillatornode.rs index 6037cc779bd..c067dc42011 100644 --- a/components/script/dom/oscillatornode.rs +++ b/components/script/dom/oscillatornode.rs @@ -7,7 +7,7 @@ use std::f32; use dom_struct::dom_struct; use js::rust::HandleObject; -use servo_media::audio::node::{AudioNodeInit, AudioNodeMessage}; +use servo_media::audio::node::{AudioNodeInit, AudioNodeMessage, AudioNodeType}; use servo_media::audio::oscillator_node::{ OscillatorNodeMessage, OscillatorNodeOptions as ServoMediaOscillatorOptions, OscillatorType as ServoMediaOscillatorType, @@ -60,6 +60,7 @@ impl OscillatorNode { window, context, node_id, + AudioNodeType::OscillatorNode, ParamType::Frequency, AutomationRate::A_rate, 440., @@ -70,6 +71,7 @@ impl OscillatorNode { window, context, node_id, + AudioNodeType::OscillatorNode, ParamType::Detune, AutomationRate::A_rate, 0., |