aout: alsa: increase periods

This commit is contained in:
DH 2024-11-13 14:17:27 +03:00
parent 676aa359e7
commit b64bfb94a5

View file

@ -78,8 +78,8 @@ void AlsaDevice::start() {
std::abort();
}
if (auto err =
snd_pcm_hw_params_set_periods(mPCMHandle, mHWParams, mSampleCount, 0);
if (auto err = snd_pcm_hw_params_set_periods(mPCMHandle, mHWParams,
mSampleCount * 10, 0);
err < 0) {
ORBIS_LOG_FATAL("Cannot set periods count", snd_strerror(err));
std::abort();
@ -241,8 +241,6 @@ long AlsaDevice::write(void *buf, long len) {
return 0;
}
snd_pcm_wait(mPCMHandle, SND_PCM_WAIT_IO);
while (true) {
snd_pcm_sframes_t r = snd_pcm_writei(mPCMHandle, buf, frames);