rewrite jack init

This commit is contained in:
🪞👃🪞 2025-01-21 22:30:53 +01:00
parent 6c8f85ab84
commit b2c9bfc0e2
19 changed files with 448 additions and 679 deletions

View file

@ -1,5 +1,4 @@
use crate::*;
#[derive(Debug, Clone, PartialEq)]
/// Event enum for JACK events.
pub enum JackEvent {
@ -14,10 +13,8 @@ pub enum JackEvent {
GraphReorder,
XRun,
}
/// Generic notification handler that emits [JackEvent]
pub struct Notifications<T: Fn(JackEvent) + Send>(pub T);
impl<T: Fn(JackEvent) + Send> NotificationHandler for Notifications<T> {
fn thread_init(&self, _: &Client) {
self.0(JackEvent::ThreadInit);