pub struct AudioServer { /* private fields */ }Expand description
Audio server that processes OS input through a DevAudioProcessor
and routes the processed audio to the output device.
Implementations§
Source§impl AudioServer
impl AudioServer
Sourcepub fn new(
processor: Box<dyn DevAudioProcessor>,
config: AudioConfig,
param_bridge: Arc<AtomicParameterBridge>,
) -> Result<Self>
pub fn new( processor: Box<dyn DevAudioProcessor>, config: AudioConfig, param_bridge: Arc<AtomicParameterBridge>, ) -> Result<Self>
Create a new audio server with the given processor, config, and parameter bridge for lock-free audio-thread parameter reads.
Sourcepub fn start(self) -> Result<(AudioHandle, Consumer<MeterUpdateNotification>)>
pub fn start(self) -> Result<(AudioHandle, Consumer<MeterUpdateNotification>)>
Start audio capture, processing, and playback.
Returns an AudioHandle that keeps both streams alive, plus a
MeterConsumer for draining meter frames from a lock-free ring
buffer (RT-safe: no allocations on the audio thread).
Drop the handle to stop audio.
Sourcepub fn has_output(&self) -> bool
pub fn has_output(&self) -> bool
Returns true if an output device is available for audio playback.
Auto Trait Implementations§
impl Freeze for AudioServer
impl !RefUnwindSafe for AudioServer
impl Send for AudioServer
impl !Sync for AudioServer
impl Unpin for AudioServer
impl UnsafeUnpin for AudioServer
impl !UnwindSafe for AudioServer
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