mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Throw on out-of-bounds channelCount in AudioNodes
This commit is contained in:
parent
0ac861ca94
commit
28c21421ca
9 changed files with 44 additions and 38 deletions
|
@ -24,24 +24,25 @@ pub struct AudioScheduledSourceNode {
|
|||
}
|
||||
|
||||
impl AudioScheduledSourceNode {
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new_inherited(
|
||||
node_type: AudioNodeInit,
|
||||
context: &BaseAudioContext,
|
||||
options: &AudioNodeOptions,
|
||||
number_of_inputs: u32,
|
||||
number_of_outputs: u32,
|
||||
) -> AudioScheduledSourceNode {
|
||||
AudioScheduledSourceNode {
|
||||
) -> Fallible<AudioScheduledSourceNode> {
|
||||
Ok(AudioScheduledSourceNode {
|
||||
node: AudioNode::new_inherited(
|
||||
node_type,
|
||||
context,
|
||||
options,
|
||||
number_of_inputs,
|
||||
number_of_outputs,
|
||||
),
|
||||
)?,
|
||||
started: Cell::new(false),
|
||||
stopped: Cell::new(false),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
pub fn node(&self) -> &AudioNode {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue