mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 20:56:43 +01:00
light up keys
This commit is contained in:
parent
e4f3942757
commit
2e7252f8b9
3 changed files with 86 additions and 53 deletions
|
|
@ -215,17 +215,17 @@ pub struct Notifications<T: Fn(AppEvent) + Send>(T);
|
|||
|
||||
impl<T: Fn(AppEvent) + Send> NotificationHandler for Notifications<T> {
|
||||
fn thread_init (&self, _: &Client) {
|
||||
println!("JACK: thread init");
|
||||
//println!("JACK: thread init");
|
||||
self.0(AppEvent::Jack(JackEvent::ThreadInit));
|
||||
}
|
||||
|
||||
fn shutdown (&mut self, status: ClientStatus, reason: &str) {
|
||||
println!("JACK: shutdown with status {:?} because \"{}\"", status, reason);
|
||||
//println!("JACK: shutdown with status {:?} because \"{}\"", status, reason);
|
||||
self.0(AppEvent::Jack(JackEvent::Shutdown));
|
||||
}
|
||||
|
||||
fn freewheel (&mut self, _: &Client, is_enabled: bool) {
|
||||
println!("JACK: freewheel mode is {}", if is_enabled { "on" } else { "off" });
|
||||
//println!("JACK: freewheel mode is {}", if is_enabled { "on" } else { "off" });
|
||||
self.0(AppEvent::Jack(JackEvent::Freewheel));
|
||||
}
|
||||
|
||||
|
|
@ -235,40 +235,40 @@ impl<T: Fn(AppEvent) + Send> NotificationHandler for Notifications<T> {
|
|||
}
|
||||
|
||||
fn client_registration (&mut self, _: &Client, name: &str, is_reg: bool) {
|
||||
println!("JACK: {} client with name \"{name}\"",
|
||||
if is_reg { "registered" } else { "unregistered" });
|
||||
//println!("JACK: {} client with name \"{name}\"",
|
||||
//if is_reg { "registered" } else { "unregistered" });
|
||||
self.0(AppEvent::Jack(JackEvent::ClientRegistration));
|
||||
}
|
||||
|
||||
fn port_registration (&mut self, _: &Client, port_id: PortId, is_reg: bool) {
|
||||
println!("JACK: {} port with id {port_id}",
|
||||
if is_reg { "registered" } else { "unregistered" });
|
||||
//println!("JACK: {} port with id {port_id}",
|
||||
//if is_reg { "registered" } else { "unregistered" });
|
||||
self.0(AppEvent::Jack(JackEvent::PortRegistration));
|
||||
}
|
||||
|
||||
fn port_rename (&mut self, _: &Client, id: PortId, old: &str, new: &str) -> Control {
|
||||
println!("JACK: port with id {id} renamed from {old} to {new}",);
|
||||
//println!("JACK: port with id {id} renamed from {old} to {new}",);
|
||||
self.0(AppEvent::Jack(JackEvent::PortRename));
|
||||
Control::Continue
|
||||
}
|
||||
|
||||
fn ports_connected (&mut self, _: &Client, a: PortId, b: PortId, are: bool) {
|
||||
println!("JACK: ports with id {a} and {b} are {}", if are {
|
||||
"connected"
|
||||
} else {
|
||||
"disconnected"
|
||||
});
|
||||
//println!("JACK: ports with id {a} and {b} are {}", if are {
|
||||
//"connected"
|
||||
//} else {
|
||||
//"disconnected"
|
||||
//});
|
||||
self.0(AppEvent::Jack(JackEvent::PortsConnected));
|
||||
}
|
||||
|
||||
fn graph_reorder (&mut self, _: &Client) -> Control {
|
||||
println!("JACK: graph reordered");
|
||||
//println!("JACK: graph reordered");
|
||||
self.0(AppEvent::Jack(JackEvent::GraphReorder));
|
||||
Control::Continue
|
||||
}
|
||||
|
||||
fn xrun (&mut self, _: &Client) -> Control {
|
||||
println!("JACK: xrun occurred");
|
||||
//println!("JACK: xrun occurred");
|
||||
self.0(AppEvent::Jack(JackEvent::XRun));
|
||||
Control::Continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue