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