Reverting tuple/arrays macros

This commit is contained in:
2026-03-16 09:16:33 +01:00
parent 10e4509e8c
commit 520d97726f
3 changed files with 203 additions and 296 deletions

View File

@ -8,17 +8,15 @@ use oxydsp_flowgraph::BlockIO;
use oxydsp_flowgraph::block::Block;
use oxydsp_flowgraph::block::BlockResult;
use oxydsp_flowgraph::edge::In;
use oxydsp_flowgraph::edge::PopIter;
use oxydsp_flowgraph::edge::PopIterable;
use oxydsp_flowgraph::flowgraph;
use oxydsp_flowgraph::graph::FlowGraph;
use oxydsp_flowgraph::stream::StreamReader;
//#[derive(BlockIO)]
#[derive(BlockIO)]
pub struct Printer<T: 'static>
{
//#[input]
input: [In<T>; 3],
#[input]
input: In<T>,
n: usize,
}
@ -27,8 +25,7 @@ impl<T: 'static> Printer<T>
{
pub fn new(input: In<T>) -> Self
{
todo!()
//Self { input, n: 0 }
Self { input, n: 0 }
}
}
@ -38,12 +35,7 @@ where
{
fn work(&mut self) -> oxydsp_flowgraph::block::BlockResult
{
let mut k: Vec<_> = self.input.iter_mut().map(|x| x.read()).collect();
k[0].pop();
k[1].next();
for x in self.input[0].pop_iter()
for x in self.input.pop_iter()
{
if self.n.is_multiple_of(2usize.pow(20))
{