mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Pass down ChannelInfo to create_node
This commit is contained in:
parent
9779ce3b88
commit
9254606b01
8 changed files with 74 additions and 61 deletions
|
@ -6,6 +6,7 @@ use dom::audionode::{AudioNode, MAX_CHANNEL_COUNT};
|
|||
use dom::baseaudiocontext::BaseAudioContext;
|
||||
use dom::bindings::codegen::Bindings::AudioDestinationNodeBinding::{self, AudioDestinationNodeMethods};
|
||||
use dom::bindings::codegen::Bindings::AudioNodeBinding::AudioNodeOptions;
|
||||
use dom::bindings::codegen::Bindings::AudioNodeBinding::{ChannelCountMode, ChannelInterpretation};
|
||||
use dom::bindings::reflector::reflect_dom_object;
|
||||
use dom::bindings::root::DomRoot;
|
||||
use dom::globalscope::GlobalScope;
|
||||
|
@ -21,11 +22,13 @@ impl AudioDestinationNode {
|
|||
context: &BaseAudioContext,
|
||||
options: &AudioNodeOptions,
|
||||
) -> AudioDestinationNode {
|
||||
let node_options = options.unwrap_or(2, ChannelCountMode::Max,
|
||||
ChannelInterpretation::Speakers);
|
||||
AudioDestinationNode {
|
||||
node: AudioNode::new_inherited_for_id(
|
||||
context.destination_node(),
|
||||
context,
|
||||
options,
|
||||
node_options,
|
||||
1,
|
||||
1,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue