mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 21:26:43 +01:00
use main loop with input everywhere
This commit is contained in:
parent
d6bf840a1f
commit
7dd5f7f488
16 changed files with 301 additions and 168 deletions
|
|
@ -6,14 +6,25 @@ pub use self::jack::*;
|
|||
pub use self::render::*;
|
||||
use crate::prelude::*;
|
||||
|
||||
pub struct Looper;
|
||||
pub struct Looper {
|
||||
exited: bool
|
||||
}
|
||||
|
||||
const ACTIONS: [(&'static str, &'static str);1] = [
|
||||
pub const ACTIONS: [(&'static str, &'static str);1] = [
|
||||
("Ins/Del", "Add/remove loop"),
|
||||
];
|
||||
|
||||
impl Looper {
|
||||
pub fn new () -> Result<Self, Box<dyn Error>> {
|
||||
Ok(Self)
|
||||
Ok(Self { exited: false })
|
||||
}
|
||||
}
|
||||
|
||||
impl Exitable for Looper {
|
||||
fn exit (&mut self) {
|
||||
self.exited = true
|
||||
}
|
||||
fn exited (&self) -> bool {
|
||||
self.exited
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue