pub struct EngineConfig {
pub buffer_size: u32,
pub sample_rate: u32,
}Expand description
Configuration for the audio engine.
Fields§
§buffer_size: u32Audio buffer size in samples. Lower = less latency, more CPU. Typical values: 32, 64, 128, 256, 512.
sample_rate: u32Sample rate in Hz. Typical values: 44100, 48000, 96000.
Implementations§
Source§impl EngineConfig
impl EngineConfig
Sourcepub fn buffer_duration_secs(&self) -> f64
pub fn buffer_duration_secs(&self) -> f64
Buffer duration in seconds.
Sourcepub fn buffer_duration_ms(&self) -> f64
pub fn buffer_duration_ms(&self) -> f64
Buffer duration in milliseconds.
Trait Implementations§
Source§impl Clone for EngineConfig
impl Clone for EngineConfig
Source§fn clone(&self) -> EngineConfig
fn clone(&self) -> EngineConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EngineConfig
impl Debug for EngineConfig
Source§impl Default for EngineConfig
impl Default for EngineConfig
Source§impl<'de> Deserialize<'de> for EngineConfig
impl<'de> Deserialize<'de> for EngineConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for EngineConfig
impl Serialize for EngineConfig
impl Copy for EngineConfig
Auto Trait Implementations§
impl Freeze for EngineConfig
impl RefUnwindSafe for EngineConfig
impl Send for EngineConfig
impl Sync for EngineConfig
impl Unpin for EngineConfig
impl UnsafeUnpin for EngineConfig
impl UnwindSafe for EngineConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more