mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +01:00
wip: modularize once again
This commit is contained in:
parent
e08c9d1790
commit
3b6ff81dad
44 changed files with 984 additions and 913 deletions
40
src/lib.rs
40
src/lib.rs
|
|
@ -24,6 +24,8 @@ pub(crate) use ::tek_tui::{
|
|||
buffer::Cell,
|
||||
}
|
||||
};
|
||||
pub use ::tek_jack;
|
||||
pub(crate) use ::tek_jack::{*, jack::{*, contrib::*}};
|
||||
|
||||
pub(crate) use std::cmp::{Ord, Eq, PartialEq};
|
||||
pub(crate) use std::collections::BTreeMap;
|
||||
|
|
@ -40,14 +42,10 @@ pub(crate) use std::thread::{spawn, JoinHandle};
|
|||
pub(crate) use std::time::Duration;
|
||||
|
||||
pub mod arranger; pub use self::arranger::*;
|
||||
pub mod clock; pub use self::clock::*;
|
||||
pub mod field; pub use self::field::*;
|
||||
pub mod file; pub use self::file::*;
|
||||
pub mod focus; pub use self::focus::*;
|
||||
pub mod groovebox; pub use self::groovebox::*;
|
||||
pub mod jack; pub use self::jack::*;
|
||||
pub mod meter; pub use self::meter::*;
|
||||
pub mod midi; pub use self::midi::*;
|
||||
pub mod mixer; pub use self::mixer::*;
|
||||
pub mod piano; pub use self::piano::*;
|
||||
pub mod plugin; pub use self::plugin::*;
|
||||
|
|
@ -55,9 +53,6 @@ pub mod pool; pub use self::pool::*;
|
|||
pub mod sampler; pub use self::sampler::*;
|
||||
pub mod sequencer; pub use self::sequencer::*;
|
||||
|
||||
pub use ::atomic_float;
|
||||
pub(crate) use atomic_float::*;
|
||||
|
||||
pub use ::midly::{self, num::u7};
|
||||
pub(crate) use ::midly::{
|
||||
Smf,
|
||||
|
|
@ -73,37 +68,6 @@ testmod! { test }
|
|||
($($name:ident)*) => { $(#[cfg(test)] mod $name;)* };
|
||||
}
|
||||
|
||||
pub trait Gettable<T> {
|
||||
/// Returns current value
|
||||
fn get (&self) -> T;
|
||||
}
|
||||
|
||||
pub trait Mutable<T>: Gettable<T> {
|
||||
/// Sets new value, returns old
|
||||
fn set (&mut self, value: T) -> T;
|
||||
}
|
||||
|
||||
pub trait InteriorMutable<T>: Gettable<T> {
|
||||
/// Sets new value, returns old
|
||||
fn set (&self, value: T) -> T;
|
||||
}
|
||||
|
||||
impl Gettable<bool> for AtomicBool {
|
||||
fn get (&self) -> bool { self.load(Relaxed) }
|
||||
}
|
||||
|
||||
impl InteriorMutable<bool> for AtomicBool {
|
||||
fn set (&self, value: bool) -> bool { self.swap(value, Relaxed) }
|
||||
}
|
||||
|
||||
impl Gettable<usize> for AtomicUsize {
|
||||
fn get (&self) -> usize { self.load(Relaxed) }
|
||||
}
|
||||
|
||||
impl InteriorMutable<usize> for AtomicUsize {
|
||||
fn set (&self, value: usize) -> usize { self.swap(value, Relaxed) }
|
||||
}
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct BigBuffer {
|
||||
pub width: usize,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue