mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-18 08:25:04 +00:00
Merge pull request #43928 from charasyn/fix-alsa-bug
Prevent ALSA audio corruption
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user