mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip(p64,e4)
This commit is contained in:
parent
f49823b7a7
commit
fffd830e15
11 changed files with 194 additions and 217 deletions
|
|
@ -13,32 +13,22 @@ macro_rules! impl_jack_api {
|
|||
macro_rules! impl_clock_api {
|
||||
($Struct:ident $(:: $field:ident)*) => {
|
||||
impl ClockApi for $Struct {
|
||||
fn timebase (&self) -> &Arc<Timebase> {
|
||||
&self$(.$field)*.current.timebase
|
||||
}
|
||||
fn quant (&self) -> &Quantize {
|
||||
fn quant (&self) -> &Arc<Quantize> {
|
||||
&self$(.$field)*.quant
|
||||
}
|
||||
fn sync (&self) -> &LaunchSync {
|
||||
fn sync (&self) -> &Arc<LaunchSync> {
|
||||
&self$(.$field)*.sync
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! impl_playhead_api {
|
||||
($Struct:ident $(:: $field:ident)*) => {
|
||||
impl PlayheadApi for $Struct {
|
||||
fn current (&self) -> &Instant {
|
||||
fn current (&self) -> &Arc<Instant> {
|
||||
&self$(.$field)*.current
|
||||
}
|
||||
fn transport (&self) -> &jack::Transport {
|
||||
fn transport_handle (&self) -> &Arc<Transport> {
|
||||
&self$(.$field)*.transport
|
||||
}
|
||||
fn playing (&self) -> &RwLock<Option<TransportState>> {
|
||||
fn transport_state (&self) -> &Arc<RwLock<Option<TransportState>>> {
|
||||
&self$(.$field)*.playing
|
||||
}
|
||||
fn started (&self) -> &RwLock<Option<(usize, usize)>> {
|
||||
fn transport_offset (&self) -> &Arc<RwLock<Option<(usize, usize)>>> {
|
||||
&self$(.$field)*.started
|
||||
}
|
||||
}
|
||||
|
|
@ -187,14 +177,9 @@ impl_jack_api!(ArrangerTui::jack);
|
|||
impl_clock_api!(TransportTui::state);
|
||||
impl_clock_api!(SequencerTui::transport);
|
||||
impl_clock_api!(ArrangerTui::transport);
|
||||
impl_clock_api!(PhrasePlayerModel::transport);
|
||||
impl_clock_api!(ArrangerTrack);
|
||||
impl_playhead_api!(TransportTui::state);
|
||||
impl_playhead_api!(SequencerTui::transport);
|
||||
impl_playhead_api!(ArrangerTui::transport);
|
||||
impl_playhead_api!(PhrasePlayerModel::transport);
|
||||
impl_playhead_api!(ArrangerTrack);
|
||||
impl_has_phrases!(PhrasesModel::phrases);
|
||||
impl_clock_api!(PhrasePlayerModel);
|
||||
impl_clock_api!(ArrangerTrack::player);
|
||||
impl_has_phrases!(PhrasesModel);
|
||||
impl_has_phrases!(SequencerTui::phrases);
|
||||
impl_has_phrases!(ArrangerTui::phrases);
|
||||
impl_midi_player!(SequencerTui::player);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue