pub struct AudioPlayback { /* private fields */ }Expand description
Audio playback stream that writes to a speaker.
Implementations§
Source§impl AudioPlayback
impl AudioPlayback
Sourcepub fn start(
selector: &DeviceSelector,
config: &AudioConfig,
) -> Result<Self, String>
pub fn start( selector: &DeviceSelector, config: &AudioConfig, ) -> Result<Self, String>
Start playing audio on the selected output device.
If the device doesn’t support the requested sample rate, we find the nearest supported rate and perform linear interpolation resampling in the playback callback.
Auto Trait Implementations§
impl Freeze for AudioPlayback
impl !RefUnwindSafe for AudioPlayback
impl !Send for AudioPlayback
impl !Sync for AudioPlayback
impl Unpin for AudioPlayback
impl UnsafeUnpin for AudioPlayback
impl !UnwindSafe for AudioPlayback
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