From a5783d14c5361d30509e288a455746ca7f7ae64d Mon Sep 17 00:00:00 2001 From: Tatsuyuki Ishi Date: Sat, 24 Aug 2019 12:32:19 +0900 Subject: [PATCH] Use snd_pcm_avail_update --- src/host/alsa/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/host/alsa/mod.rs b/src/host/alsa/mod.rs index 1005d82..e030cd1 100644 --- a/src/host/alsa/mod.rs +++ b/src/host/alsa/mod.rs @@ -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 { - // 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