aboutsummaryrefslogtreecommitdiff
path: root/src/io.rs
diff options
context:
space:
mode:
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