Add Voice::get_pending_samples
This commit is contained in:
parent
a709d91d66
commit
44e9dce43f
5 changed files with 46 additions and 1 deletions
10
src/lib.rs
10
src/lib.rs
|
|
@ -380,6 +380,16 @@ impl Voice {
|
|||
self.voice.pause()
|
||||
}
|
||||
|
||||
/// Returns the number of samples in the buffer that are currently being processed by the
|
||||
/// audio playback backend.
|
||||
///
|
||||
/// This function is useful to determine how much time it will take to finish playing the
|
||||
/// current sound.
|
||||
#[inline]
|
||||
pub fn get_pending_samples(&self) -> usize {
|
||||
self.voice.get_pending_samples()
|
||||
}
|
||||
|
||||
/// Returns true if the voice has finished reading all the data you sent to it.
|
||||
#[inline]
|
||||
pub fn underflowed(&self) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue