1pub mod atomic_float;
2pub mod channel_config;
3pub mod clock;
4pub mod collector;
5pub mod diff;
6pub mod dsp;
7pub mod event;
8pub mod node;
9pub mod param;
10pub mod sample_resource;
11pub mod sync_wrapper;
12
13mod silence_mask;
14
15use core::num::NonZeroU32;
16
17pub use silence_mask::SilenceMask;
18
19extern crate self as firewheel_core;
20
21#[derive(Debug, Clone, PartialEq)]
23pub struct StreamInfo {
24 pub sample_rate: NonZeroU32,
25 pub sample_rate_recip: f64,
27 pub max_block_frames: NonZeroU32,
28 pub num_stream_in_channels: u32,
29 pub num_stream_out_channels: u32,
30 pub input_to_output_latency_seconds: f64,
32 pub declick_frames: NonZeroU32,
33 pub input_device_name: Option<String>,
35 pub output_device_name: Option<String>,
37}
38
39impl Default for StreamInfo {
40 fn default() -> Self {
41 Self {
42 sample_rate: NonZeroU32::new(44100).unwrap(),
43 sample_rate_recip: 44100.0f64.recip(),
44 max_block_frames: NonZeroU32::new(1024).unwrap(),
45 num_stream_in_channels: 0,
46 num_stream_out_channels: 2,
47 input_to_output_latency_seconds: 0.0,
48 declick_frames: NonZeroU32::MIN,
49 input_device_name: None,
50 output_device_name: None,
51 }
52 }
53}
54
55#[cfg(feature = "symphonium")]
56pub use sample_resource::{load_audio_file, load_audio_file_from_source};