Struct wasapi::AudioClock
source · pub struct AudioClock { /* private fields */ }
Expand description
Struct wrapping an IAudioClock.
Implementations§
source§impl AudioClock
impl AudioClock
sourcepub fn get_frequency(&self) -> Result<u64, Box<dyn Error>>
pub fn get_frequency(&self) -> Result<u64, Box<dyn Error>>
Get the frequency for this AudioClock. Note that the unit for the value is undefined.
sourcepub fn get_position(&self) -> Result<(u64, u64), Box<dyn Error>>
pub fn get_position(&self) -> Result<(u64, u64), Box<dyn Error>>
Get the current device position. Returns the position, as well as the value of the performance counter at the time the position values was taken. The unit for the position value is undefined, but the frequency and position values are in the same unit. Dividing the position with the frequency gets the position in seconds.
Auto Trait Implementations§
impl Freeze for AudioClock
impl RefUnwindSafe for AudioClock
impl !Send for AudioClock
impl !Sync for AudioClock
impl Unpin for AudioClock
impl UnwindSafe for AudioClock
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