Skip to content

Commit

Permalink
snd_pcm_avail_update -> snd_pcm_avail. Hope it fixes occasional sound…
Browse files Browse the repository at this point in the history
… corruption.
  • Loading branch information
captainys committed Oct 16, 2023
1 parent 8bf5ed4 commit 85d63a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/yssimplesound/src/linux_alsa/yssimplesound_linux_alsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<nAvail)
if(nPeriod<=nAvail)
{
unsigned int writeBufFilledInNStep=0;
int nThSound=0;
Expand Down

0 comments on commit 85d63a6

Please sign in to comment.