summaryrefslogtreecommitdiff
path: root/drivers/alsa/audio_driver_alsa.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-11-28 08:54:02 +0100
committerGitHub <noreply@github.com>2020-11-28 08:54:02 +0100
commit4f486bc7a122546df2f24d1f9beee004c025a101 (patch)
tree291fab37d2dc9274d37384710c36d5edef541fc8 /drivers/alsa/audio_driver_alsa.cpp
parent828d1ea59eb95edc840ca25de5f8c594fd9b584e (diff)
parent25b2f82ccfe98ec06f730813e818443df0e10972 (diff)
Merge pull request #43928 from charasyn/fix-alsa-bug
Prevent ALSA audio corruption
Diffstat (limited to 'drivers/alsa/audio_driver_alsa.cpp')
-rw-r--r--drivers/alsa/audio_driver_alsa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp
index 488fd4b468..7aa3787ced 100644
--- a/drivers/alsa/audio_driver_alsa.cpp
+++ b/drivers/alsa/audio_driver_alsa.cpp
@@ -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) {