coreaudio: fix play of uninitialized data (loud CRACK)
commit61037b63695182fc2031614ef554d000ce5c9a0d
authorThomas Guillem <thomas@gllm.fr>
Thu, 8 Oct 2020 10:31:20 +0000 (8 12:31 +0200)
committerMarvin Scholz <epirat07@gmail.com>
Fri, 9 Oct 2020 22:48:21 +0000 (10 00:48 +0200)
tree5f4c5d366ace69ca42d425594725263fe26e6b7a
parent4d79988692ef342fdaef2a66c370f3bae6270352
coreaudio: fix play of uninitialized data (loud CRACK)

When starting deferred (likely), ca_Render() is filling the output
buffer with 0s (silence) until the requested start time is reached. When
the host time is near the requested start time, the output buffer is
partially filled with 0s, and partially filled with valid data.

In that particular case, the output buffer offset was not updated
causing the valid data to be copied at the beginning of the output
buffer, leaving some uninitialized data at the end of the buffer.

Fixes #25142

Signed-off-by: Marvin Scholz <epirat07@gmail.com>
modules/audio_output/coreaudio_common.c