We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a7687d commit 884e0edCopy full SHA for 884e0ed
src/worklet.rs
@@ -323,11 +323,13 @@ impl AudioProcessor for AudioWorkletRenderer {
323
324
// Create an iterator for the output channel counts without allocating, handling also the
325
// case where self.output_channel_count is empty.
326
- let output_channel_count = self
327
- .output_channel_count
328
- .iter()
329
- .copied()
330
- .chain(std::iter::once(inputs[0].number_of_channels()));
+ let single_case = [inputs.get(0).map(|i| i.number_of_channels()).unwrap_or_default()];
+
+ let output_channel_count = if self.output_channel_count.is_empty() {
+ single_case.iter()
+ } else {
331
+ self.output_channel_count.iter()
332
+ }.copied();
333
334
outputs
335
.iter_mut()
0 commit comments