aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/audiobuffersourcenode.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2018-09-11 17:07:10 +0530
committerManish Goregaokar <manishsmail@gmail.com>2018-09-11 19:24:01 +0530
commit9254606b014cdfed6f4a1eaf6eb8e656e1c2422b (patch)
tree0e6daa55ba816cea03814ca7892fc278f789d17d /components/script/dom/audiobuffersourcenode.rs
parent9779ce3b88f9c1e15e0ab785740e6a630ba5cbb1 (diff)
downloadservo-9254606b014cdfed6f4a1eaf6eb8e656e1c2422b.tar.gz
servo-9254606b014cdfed6f4a1eaf6eb8e656e1c2422b.zip
Pass down ChannelInfo to create_node
Diffstat (limited to 'components/script/dom/audiobuffersourcenode.rs')
-rw-r--r--components/script/dom/audiobuffersourcenode.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/components/script/dom/audiobuffersourcenode.rs b/components/script/dom/audiobuffersourcenode.rs
index a3ddf4121a9..3e7948fdb3e 100644
--- a/components/script/dom/audiobuffersourcenode.rs
+++ b/components/script/dom/audiobuffersourcenode.rs
@@ -9,8 +9,6 @@ use dom::baseaudiocontext::BaseAudioContext;
use dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding;
use dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceNodeMethods;
use dom::bindings::codegen::Bindings::AudioBufferSourceNodeBinding::AudioBufferSourceOptions;
-use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
-use dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions;
use dom::bindings::codegen::Bindings::AudioParamBinding::AutomationRate;
use dom::bindings::codegen::Bindings::AudioScheduledSourceNodeBinding::AudioScheduledSourceNodeMethods;
use dom::bindings::error::{Error, Fallible};
@@ -45,14 +43,11 @@ impl AudioBufferSourceNode {
context: &BaseAudioContext,
options: &AudioBufferSourceOptions,
) -> Fallible<AudioBufferSourceNode> {
- let mut node_options = AudioNodeOptions::empty();
- node_options.channelCount = Some(2);
- node_options.channelCountMode = Some(ChannelCountMode::Max);
- node_options.channelInterpretation = Some(ChannelInterpretation::Speakers);
+ let node_options = Default::default();
let source_node = AudioScheduledSourceNode::new_inherited(
AudioNodeInit::AudioBufferSourceNode(options.into()),
context,
- &node_options,
+ node_options,
0, /* inputs */
1, /* outputs */
)?;