plugin ins/outs

This commit is contained in:
🪞👃🪞 2024-06-27 10:18:10 +03:00
parent da1d3220f9
commit 9351887ae6
9 changed files with 187 additions and 64 deletions

View file

@ -21,7 +21,11 @@ pub use self::launcher::Launcher;
use crossterm::event;
use ::jack::{AudioIn, AudioOut, MidiIn, MidiOut, Port, PortSpec, Client};
pub trait Device: Render + Handle + PortList + Send + Sync {}
pub trait Device: Render + Handle + PortList + Send + Sync {
fn boxed (self) -> Box<dyn Device> where Self: Sized + 'static {
Box::new(self)
}
}
pub fn run (device: impl Device + Send + Sync + 'static) -> Result<(), Box<dyn Error>> {
let device = Arc::new(Mutex::new(device));
@ -138,7 +142,7 @@ pub trait PortList {
fn midi_outs (&self) -> Usually<Vec<String>> {
Ok(vec![])
}
fn connect (&mut self, connect: bool, source: &str, target: &str)
fn connect (&mut self, _connect: bool, _source: &str, _target: &str)
-> Usually<()>
{
Ok(())