Skip to content

Commit 3d12566

Browse files
committed
Fix updating DestinationNode channelCountMode
1 parent 2ac335d commit 3d12566

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/node/destination.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,16 @@ impl AudioNode for AudioDestinationNode {
6666
self.channel_config.set_count(v);
6767
}
6868

69-
fn set_channel_count_mode(&self, _v: ChannelCountMode) {
69+
fn set_channel_count_mode(&self, v: ChannelCountMode) {
7070
// [spec] If the AudioDestinationNode is the destination node of an
7171
// OfflineAudioContext, then the channel count mode cannot be changed.
7272
// An InvalidStateError exception MUST be thrown for any attempt to change the value.
7373
assert!(
7474
!self.registration.context().offline(),
7575
"InvalidStateError - AudioDestinationNode has channel count mode constraints",
7676
);
77+
78+
self.channel_config.set_count_mode(v);
7779
}
7880
}
7981

0 commit comments

Comments
 (0)