aboutsummaryrefslogtreecommitdiff
path: root/src/io.rs
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-07-12 02:45:38 +0200
committerAstatin <[email protected]>2025-07-12 02:45:38 +0200
commit9d24a19cd9a392d5a2067a3e233a5a26a1518c35 (patch)
tree0a47acf10b6a029977ba7bd4c3fad59f5f5f28e2 /src/io.rs
parentbfe34191a52e356ce92df8e6b10d3ba2b4598fe8 (diff)
Update audio registers without trigger + add stereo
Diffstat (limited to 'src/io.rs')
-rw-r--r--src/io.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/io.rs b/src/io.rs
index 4b7ca08..fae191a 100644
--- a/src/io.rs
+++ b/src/io.rs
@@ -60,8 +60,12 @@ impl<T: Serial + ?Sized> Serial for Box<T> {
}
}
+pub trait Wave {
+ fn next(&mut self, left: bool) -> Option<f32>;
+}
+
pub trait Audio {
- fn new<S: Iterator<Item = f32> + Send + 'static>(wave: S) -> Self;
+ fn new<S: Wave + Send + 'static>(wave: S) -> Self;
}
pub trait LoadSave