Merge pull request #323 from ishitatsuyuki/alsa-avail-update
Use snd_pcm_avail_update
This commit is contained in:
commit
9e3a19c352
|
@ -1054,9 +1054,8 @@ fn check_for_pollout_or_pollin(
|
||||||
|
|
||||||
// Determine the number of samples that are available to read/write.
|
// Determine the number of samples that are available to read/write.
|
||||||
fn get_available_samples(stream: &StreamInner) -> Result<usize, BackendSpecificError> {
|
fn get_available_samples(stream: &StreamInner) -> Result<usize, BackendSpecificError> {
|
||||||
// TODO: what about snd_pcm_avail_update?
|
|
||||||
let available = unsafe {
|
let available = unsafe {
|
||||||
alsa::snd_pcm_avail(stream.channel)
|
alsa::snd_pcm_avail_update(stream.channel)
|
||||||
};
|
};
|
||||||
if available == -32 {
|
if available == -32 {
|
||||||
// buffer underrun
|
// buffer underrun
|
||||||
|
|
Loading…
Reference in New Issue