bye DynamicDevice; now to reenable playback...

This commit is contained in:
🪞👃🪞 2024-07-03 21:18:39 +03:00
parent 55a85fafef
commit 9d46cb7619
4 changed files with 40 additions and 125 deletions

View file

@ -1,29 +1,9 @@
use crate::core::*;
pub struct Looper {
name: String
pub name: String
}
impl Looper {
pub fn new (name: &str) -> Result<DynamicDevice<Self>, Box<dyn Error>> {
Ok(DynamicDevice::new(render, handle, process, Self {
name: name.into(),
}))
}
}
pub fn process (_: &mut Looper, _: &Client, _: &ProcessScope) -> Control {
Control::Continue
}
pub fn render (_: &Looper, _: &mut Buffer, _: Rect) -> Usually<Rect> {
Ok(Rect::default())
}
pub fn handle (_: &mut Looper, _: &AppEvent) -> Usually<bool> {
Ok(false)
}
pub const ACTIONS: [(&'static str, &'static str);1] = [
("Ins/Del", "Add/remove loop"),
];
render!(Looper);
handle!(Looper);
process!(Looper);
ports!(Looper);