From 85d63a68d701fae0c49428996dbc3dbe52f676e6 Mon Sep 17 00:00:00 2001 From: Soji Yamakawa Date: Sun, 15 Oct 2023 22:34:25 -0400 Subject: [PATCH] snd_pcm_avail_update -> snd_pcm_avail. Hope it fixes occasional sound corruption. --- src/yssimplesound/src/linux_alsa/yssimplesound_linux_alsa.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/yssimplesound/src/linux_alsa/yssimplesound_linux_alsa.cpp b/src/yssimplesound/src/linux_alsa/yssimplesound_linux_alsa.cpp index 940eba8..cbe2b84 100644 --- a/src/yssimplesound/src/linux_alsa/yssimplesound_linux_alsa.cpp +++ b/src/yssimplesound/src/linux_alsa/yssimplesound_linux_alsa.cpp @@ -311,9 +311,9 @@ void YsSoundPlayer::APISpecificData::KeepPlaying(void) snd_pcm_wait(handle,1); } - const int nAvail=(unsigned int)snd_pcm_avail_update(handle); + const int nAvail=(unsigned int)snd_pcm_avail(handle); - if(nPeriod