@@ -6,9 +6,7 @@ use crate::render::{
66} ;
77use crate :: MAX_CHANNELS ;
88
9- use super :: {
10- AudioNode , ChannelConfig , ChannelConfigOptions , ChannelCountMode , ChannelInterpretation ,
11- } ;
9+ use super :: { AudioNode , AudioNodeOptions , ChannelConfig , ChannelCountMode , ChannelInterpretation } ;
1210
1311/// Assert that the given number of channels is valid for a ChannelMergerNode
1412///
@@ -68,17 +66,17 @@ fn assert_valid_channel_interpretation(interpretation: ChannelInterpretation) {
6866#[ derive( Clone , Debug ) ]
6967pub struct ChannelSplitterOptions {
7068 pub number_of_outputs : usize ,
71- pub channel_config : ChannelConfigOptions ,
69+ pub audio_node_options : AudioNodeOptions ,
7270}
7371
7472impl Default for ChannelSplitterOptions {
7573 fn default ( ) -> Self {
7674 Self {
7775 number_of_outputs : 6 ,
78- channel_config : ChannelConfigOptions {
79- count : 6 , // must be same as number_of_outputs
80- count_mode : ChannelCountMode :: Explicit ,
81- interpretation : ChannelInterpretation :: Discrete ,
76+ audio_node_options : AudioNodeOptions {
77+ channel_count : 6 , // must be same as number_of_outputs
78+ channel_count_mode : ChannelCountMode :: Explicit ,
79+ channel_interpretation : ChannelInterpretation :: Discrete ,
8280 } ,
8381 }
8482 }
@@ -133,14 +131,14 @@ impl ChannelSplitterNode {
133131 pub fn new < C : BaseAudioContext > ( context : & C , mut options : ChannelSplitterOptions ) -> Self {
134132 context. base ( ) . register ( move |registration| {
135133 assert_valid_number_of_channels ( options. number_of_outputs ) ;
136- options. channel_config . count = options. number_of_outputs ;
134+ options. audio_node_options . channel_count = options. number_of_outputs ;
137135
138- assert_valid_channel_count_mode ( options. channel_config . count_mode ) ;
139- assert_valid_channel_interpretation ( options. channel_config . interpretation ) ;
136+ assert_valid_channel_count_mode ( options. audio_node_options . channel_count_mode ) ;
137+ assert_valid_channel_interpretation ( options. audio_node_options . channel_interpretation ) ;
140138
141139 let node = ChannelSplitterNode {
142140 registration,
143- channel_config : options. channel_config . into ( ) ,
141+ channel_config : options. audio_node_options . into ( ) ,
144142 } ;
145143
146144 let render = ChannelSplitterRenderer {
0 commit comments