mirror of https://github.com/godotengine/godot
Merge pull request #43928 from charasyn/fix-alsa-bug
Prevent ALSA audio corruption
This commit is contained in:
commit
4f486bc7a1
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue