Add Voice::get_period()
This commit is contained in:
parent
6c72a7c08b
commit
c93ffcff6c
5 changed files with 36 additions and 7 deletions
10
src/lib.rs
10
src/lib.rs
|
|
@ -324,6 +324,16 @@ impl Voice {
|
|||
self.format().data_type
|
||||
}
|
||||
|
||||
/// Returns the minimum number of samples that should be put in a buffer before it is
|
||||
/// processable by the audio output.
|
||||
///
|
||||
/// If you put less than this value in the buffer, the buffer will not be processed and you
|
||||
/// risk an underrun.
|
||||
#[inline]
|
||||
pub fn get_period(&self) -> usize {
|
||||
self.voice.get_period()
|
||||
}
|
||||
|
||||
/// Adds some PCM data to the voice's buffer.
|
||||
///
|
||||
/// This function indirectly returns a `Buffer` object that must be filled with the audio data.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue