Starting BlockSync

This commit is contained in:
2026-03-12 21:17:38 +01:00
parent e13b4a49b5
commit 092fb0191f
2 changed files with 60 additions and 39 deletions

View File

@ -1,8 +1,8 @@
use oxydsp_flowgraph::{
block::SyncBlock,
edge::{In, Out},
};
use oxydsp_flowgraph_macros::{BlockIO, sync_block};
use oxydsp_flowgraph::block::SyncBlock;
use oxydsp_flowgraph::edge::In;
use oxydsp_flowgraph::edge::Out;
use oxydsp_flowgraph_macros::BlockIO;
use oxydsp_flowgraph_macros::sync_block;
#[derive(BlockIO)]
//#[sync_block]
@ -24,9 +24,10 @@ impl oxydsp_flowgraph::block::Block for Test
len = len.min(input_reader.len());
let mut output_writer = self.output.write();
len = len.min(output_writer.len());
//let input = input_reader.pop().unwrap();
let input = 0;
for _ in 0..len
{
let input = input_reader.pop().unwrap();
let (output_out,) = self.sync_work((input,));
output_writer.push(output_out).unwrap();
}