mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
webaudio: Throw when setting invalid automationRate on AudioBufferSourceNode (#26469)
This commit is contained in:
parent
5c87fe940e
commit
201cdbab17
12 changed files with 56 additions and 22 deletions
|
@ -10,7 +10,7 @@ use js::rust::HandleObject;
|
|||
use servo_media::audio::buffer_source_node::{
|
||||
AudioBufferSourceNodeMessage, AudioBufferSourceNodeOptions,
|
||||
};
|
||||
use servo_media::audio::node::{AudioNodeInit, AudioNodeMessage};
|
||||
use servo_media::audio::node::{AudioNodeInit, AudioNodeMessage, AudioNodeType};
|
||||
use servo_media::audio::param::ParamType;
|
||||
|
||||
use crate::dom::audiobuffer::AudioBuffer;
|
||||
|
@ -61,6 +61,7 @@ impl AudioBufferSourceNode {
|
|||
&window,
|
||||
context,
|
||||
node_id,
|
||||
AudioNodeType::AudioBufferSourceNode,
|
||||
ParamType::PlaybackRate,
|
||||
AutomationRate::K_rate,
|
||||
*options.playbackRate,
|
||||
|
@ -71,6 +72,7 @@ impl AudioBufferSourceNode {
|
|||
&window,
|
||||
context,
|
||||
node_id,
|
||||
AudioNodeType::AudioBufferSourceNode,
|
||||
ParamType::Detune,
|
||||
AutomationRate::K_rate,
|
||||
*options.detune,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue