wip: refactor pt.32: 89 errors, traits

This commit is contained in:
🪞👃🪞 2024-11-15 00:17:36 +01:00
parent 8b5931c321
commit ce78b95d8a
28 changed files with 946 additions and 822 deletions

View file

@ -5,46 +5,43 @@ pub(crate) use std::fmt::{Debug, Formatter, Error};
pub(crate) use tek_core::jack::{
Client, ProcessScope, Control, CycleTimes,
Port, MidiIn, MidiOut, AudioIn, AudioOut, Unowned,
TransportState, MidiIter, RawMidi
Transport, TransportState, MidiIter, RawMidi
};
submod! {
//api_jack
arrange
api_arranger
api_arranger_clip
api_arranger_scene
api_arranger_track
clock
api_clock
mixer
mixer_track
//api_mixer
//api_mixer_track
phrase
api_phrase
plugin
plugin_kind
plugin_lv2
api_playhead
pool
//api_plugin
//api_plugin_kind
//api_plugin_lv2
sampler
sampler_sample
sampler_voice
api_pool
sequencer
//api_sampler
//api_sampler_sample
//api_sampler_voice
status
api_sequencer
transport
impls
models
}
pub trait JackModelApi {
pub trait HasJack {
fn jack (&self) -> &Arc<RwLock<JackClient>>;
}
pub trait ClockModelApi {
fn clock (&self) -> &Arc<Clock>;
fn is_stopped (&self) -> bool {
*self.clock().playing.read().unwrap() == Some(TransportState::Stopped)
}
}