Merge pull request #323 from ishitatsuyuki/alsa-avail-update

Use snd_pcm_avail_update
This commit is contained in:
est31 2019-08-24 07:51:20 +02:00 committed by GitHub
commit 9e3a19c352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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