Struct windows_audio::Audio
source · [−]Fields
is_mute: bool
volume: f32
Implementations
sourceimpl Audio
impl Audio
sourcepub fn new() -> Self
pub fn new() -> Self
Sounds a wav file that can be used by default on windowsOS
Examples
let audio = windows_audio::Audio::new();
let audios = audio.get_audios();
audio.play(&audios[0].name);
std::thread::sleep(std::time::Duration::from_secs(7));
pub fn get_audios(&self) -> Vec<AudioInfo>
pub fn play(&self, name: &str)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Audio
impl Send for Audio
impl Sync for Audio
impl Unpin for Audio
impl UnwindSafe for Audio
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more