mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
wip: port: make device
This commit is contained in:
parent
447638ee71
commit
cb7e4f7a95
31 changed files with 602 additions and 865 deletions
|
|
@ -43,7 +43,7 @@ impl std::fmt::Debug for Clock {
|
|||
}
|
||||
|
||||
impl Clock {
|
||||
pub fn new (jack: &Jack, bpm: Option<f64>) -> Usually<Self> {
|
||||
pub fn new (jack: &Jack<'static>, bpm: Option<f64>) -> Usually<Self> {
|
||||
let (chunk, transport) = jack.with_client(|c|(c.buffer_size(), c.transport()));
|
||||
let timebase = Arc::new(Timebase::default());
|
||||
let clock = Self {
|
||||
|
|
@ -56,9 +56,9 @@ impl Clock {
|
|||
offset: Arc::new(Moment::zero(&timebase)),
|
||||
started: RwLock::new(None).into(),
|
||||
timebase,
|
||||
midi_in: Arc::new(RwLock::new(Some(MidiInput::new(jack, "M/clock", &[])?))),
|
||||
midi_out: Arc::new(RwLock::new(Some(MidiOutput::new(jack, "clock/M", &[])?))),
|
||||
click_out: Arc::new(RwLock::new(Some(AudioOutput::new(jack, "click", &[])?))),
|
||||
midi_in: Arc::new(RwLock::new(Some(MidiInput::new(jack, &"M/clock", &[])?))),
|
||||
midi_out: Arc::new(RwLock::new(Some(MidiOutput::new(jack, &"clock/M", &[])?))),
|
||||
click_out: Arc::new(RwLock::new(Some(AudioOutput::new(jack, &"click", &[])?))),
|
||||
};
|
||||
if let Some(bpm) = bpm {
|
||||
clock.timebase.bpm.set(bpm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue