Use snd_pcm_avail_update

This commit is contained in:
Tatsuyuki Ishi 2019-08-24 12:32:19 +09:00
parent 447ad5d727
commit a5783d14c5
1 changed files with 1 additions and 2 deletions

View File

@ -1054,9 +1054,8 @@ fn check_for_pollout_or_pollin(
// Determine the number of samples that are available to read/write.
fn get_available_samples(stream: &StreamInner) -> Result<usize, BackendSpecificError> {
// TODO: what about snd_pcm_avail_update?
let available = unsafe {
alsa::snd_pcm_avail(stream.channel)
alsa::snd_pcm_avail_update(stream.channel)
};
if available == -32 {
// buffer underrun