Merge pull request #43928 from charasyn/fix-alsa-bug

Prevent ALSA audio corruption
This commit is contained in:
Rémi Verschelde
2020-11-28 08:54:02 +01:00
committed by GitHub
+1 -1
View File
@@ -183,7 +183,7 @@ void AudioDriverALSA::thread_func(void *p_udata) {
int total = 0;
while (todo && !ad->exit_thread) {
uint8_t *src = (uint8_t *)ad->samples_out.ptr();
int16_t *src = (int16_t *)ad->samples_out.ptr();
int wrote = snd_pcm_writei(ad->pcm_handle, (void *)(src + (total * ad->channels)), todo);
if (wrote > 0) {