Skip to content

Commit 28cee6b

Browse files
committed
Reorder stuff
1 parent fb973ff commit 28cee6b

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

toybox-audio/src/lib.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ pub mod prelude {
1717
}
1818

1919

20+
#[derive(Debug, Copy, Clone)]
21+
pub struct Configuration {
22+
pub sample_rate: u32,
23+
pub channels: usize,
24+
}
25+
26+
pub trait Provider : Send + 'static {
27+
fn on_configuration_changed(&mut self, _: Option<Configuration>);
28+
fn fill_buffer(&mut self, buffer: &mut [f32]);
29+
}
30+
31+
2032
pub struct System {
2133
stream_shared: Arc<SharedStreamState>,
2234
stream_state: StreamState,
@@ -115,14 +127,3 @@ impl System {
115127
}
116128
}
117129
}
118-
119-
#[derive(Debug, Copy, Clone)]
120-
pub struct Configuration {
121-
pub sample_rate: u32,
122-
pub channels: usize,
123-
}
124-
125-
pub trait Provider : Send + 'static {
126-
fn on_configuration_changed(&mut self, _: Option<Configuration>);
127-
fn fill_buffer(&mut self, buffer: &mut [f32]);
128-
}

0 commit comments

Comments
 (0)