mirror of
https://codeberg.org/unspeaker/tek.git
synced 2026-03-13 11:50:44 +01:00
move the jack stuff into tengri
This commit is contained in:
parent
9ae35830c3
commit
6295f2e601
12 changed files with 107 additions and 440 deletions
22
app/tek.rs
22
app/tek.rs
|
|
@ -13,8 +13,8 @@ extern crate xdg;
|
|||
pub(crate) use ::xdg::BaseDirectories;
|
||||
pub extern crate atomic_float;
|
||||
pub(crate) use atomic_float::AtomicF64;
|
||||
pub extern crate jack;
|
||||
pub(crate) use ::jack::{*, contrib::{*, ClosureProcessHandler}};
|
||||
//pub extern crate jack;
|
||||
//pub(crate) use ::jack::{*, contrib::{*, ClosureProcessHandler}};
|
||||
pub extern crate midly;
|
||||
pub(crate) use ::midly::{Smf, TrackEventKind, MidiMessage, Error as MidiError, num::*, live::*};
|
||||
pub extern crate tengri;
|
||||
|
|
@ -301,10 +301,10 @@ pub fn tek_print_status (project: &Arrangement) {
|
|||
}
|
||||
|
||||
/// Return boxed iterator of MIDI events
|
||||
pub fn parse_midi_input <'a> (input: ::jack::MidiIter<'a>)
|
||||
pub fn parse_midi_input <'a> (input: ::tengri::jack::MidiIter<'a>)
|
||||
-> Box<dyn Iterator<Item=(usize, LiveEvent<'a>, &'a [u8])> + 'a>
|
||||
{
|
||||
Box::new(input.map(|::jack::RawMidi { time, bytes }|(
|
||||
Box::new(input.map(|::tengri::jack::RawMidi { time, bytes }|(
|
||||
time as usize,
|
||||
LiveEvent::parse(bytes).unwrap(),
|
||||
bytes
|
||||
|
|
@ -426,24 +426,10 @@ impl Device {
|
|||
}
|
||||
}
|
||||
|
||||
audio!(|self: DeviceAudio<'a>, client, scope|{
|
||||
use Device::*;
|
||||
match self.0 {
|
||||
Mute => { Control::Continue },
|
||||
Bypass => { /*TODO*/ Control::Continue },
|
||||
#[cfg(feature = "sampler")] Sampler(sampler) => sampler.process(client, scope),
|
||||
#[cfg(feature = "lv2")] Lv2(lv2) => lv2.process(client, scope),
|
||||
#[cfg(feature = "vst2")] Vst2 => { todo!() }, // TODO
|
||||
#[cfg(feature = "vst3")] Vst3 => { todo!() }, // TODO
|
||||
#[cfg(feature = "clap")] Clap => { todo!() }, // TODO
|
||||
#[cfg(feature = "sf2")] Sf2 => { todo!() }, // TODO
|
||||
}
|
||||
});
|
||||
|
||||
//take!(DeviceCommand|state: Arrangement, iter|state.selected_device().as_ref()
|
||||
//.map(|t|Take::take(t, iter)).transpose().map(|x|x.flatten()));
|
||||
|
||||
|
||||
#[macro_export] macro_rules! has_clip {
|
||||
(|$self:ident:$Struct:ident$(<$($L:lifetime),*$($T:ident$(:$U:path)?),*>)?|$cb:expr) => {
|
||||
impl $(<$($L),*$($T $(: $U)?),*>)? HasMidiClip for $Struct $(<$($L),*$($T),*>)? {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue