Skip to content

Commit

Permalink
Merge pull request #43928 from charasyn/fix-alsa-bug
Browse files Browse the repository at this point in the history
Prevent ALSA audio corruption
  • Loading branch information
akien-mga authored Nov 28, 2020
2 parents 828d1ea + 25b2f82 commit 4f486bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/alsa/audio_driver_alsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4f486bc

Please sign in to comment.