Skip to content

Commit

Permalink
Fix BufferReaderMulti channels from buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikNatanael committed Oct 7, 2024
1 parent 2b52914 commit 0bac16b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions knyst/src/gen/osc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ impl Gen for BufferReaderMulti {
}

fn name(&self) -> &'static str {
"BufferReader"
"BufferReaderMulti"
}
}

Expand All @@ -384,7 +384,9 @@ pub fn buffer_reader_multi(
looping: bool,
stop_action: StopAction,
) -> knyst::handles::Handle<BufferReaderMultiHandle> {
let gen = BufferReaderMulti::new(buffer, rate, stop_action).looping(looping);
let gen = BufferReaderMulti::new(buffer, rate, stop_action)
.looping(looping)
.channels(buffer.num_channels());
let num_channels = buffer.num_channels();
let id = knyst::prelude::KnystCommands::push_without_inputs(&mut knyst_commands(), gen);
knyst::handles::Handle::new(BufferReaderMultiHandle {
Expand All @@ -404,7 +406,7 @@ impl HandleData for BufferReaderMultiHandle {
}

fn in_channels(&self) -> knyst::handles::SinkChannelIter {
knyst::handles::SinkChannelIter::None
knyst::handles::SinkChannelIter::single_node_id(self.node_id, 0)
}

fn node_ids(&self) -> knyst::handles::NodeIdIter {
Expand Down

0 comments on commit 0bac16b

Please sign in to comment.