mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 12:46:42 +01:00
break down sampler into modules and align with sequencer
This commit is contained in:
parent
774af02e5e
commit
a4835e2c81
13 changed files with 644 additions and 602 deletions
|
|
@ -6,7 +6,6 @@ pub struct SequencerStatus {
|
|||
pub(crate) width: usize,
|
||||
pub(crate) cpu: Option<String>,
|
||||
pub(crate) size: String,
|
||||
pub(crate) res: String,
|
||||
pub(crate) playing: bool,
|
||||
}
|
||||
from!(|state:&SequencerTui|SequencerStatus = {
|
||||
|
|
@ -19,7 +18,6 @@ from!(|state:&SequencerTui|SequencerStatus = {
|
|||
playing: state.clock.is_rolling(),
|
||||
cpu: state.perf.percentage().map(|cpu|format!("│{cpu:.01}%")),
|
||||
size: format!("{}x{}│", width, state.size.h()),
|
||||
res: format!("│{}s│{:.1}kHz│{:.1}ms│", samples, rate / 1000., buffer * 1000.),
|
||||
}
|
||||
});
|
||||
render!(<Tui>|self: SequencerStatus|Fixed::h(2, lay!([
|
||||
|
|
@ -47,6 +45,6 @@ impl SequencerStatus {
|
|||
]))
|
||||
}
|
||||
fn stats (&self) -> impl Render<Tui> + use<'_> {
|
||||
row!([&self.cpu, &self.res, &self.size])
|
||||
row!([&self.cpu, &self.size])
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue