1
0
Fork 0

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
commit 4f486bc7a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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) {