Add Voice::get_pending_samples
This commit is contained in:
parent
a709d91d66
commit
44e9dce43f
5 changed files with 46 additions and 1 deletions
|
|
@ -193,6 +193,15 @@ impl Voice {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_pending_samples(&self) -> usize {
|
||||
unsafe {
|
||||
let mut padding = mem::uninitialized();
|
||||
let hresult = (*self.audio_client).GetCurrentPadding(&mut padding);
|
||||
check_result(hresult).unwrap();
|
||||
padding as usize
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn play(&mut self) {
|
||||
if !self.playing {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue