mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-07 12:16:42 +01:00
rewrite jack init
This commit is contained in:
parent
6c8f85ab84
commit
b2c9bfc0e2
19 changed files with 448 additions and 679 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue