audio: stop corrupting audio on underreads

regression introduced in b74c09efbf

Signed-off-by: Aman Karmani <aman@tmm1.net>
This commit is contained in:
Aman Karmani authored and sfan5 committed 2021-12-19 15:56:50 +01:00
1 parent bde10d2771
commit f8b85dd65d
1 file changed
+2 -1
+2 -1
View File
@@ -162,7 +162,8 @@ static int read_buffer(struct ao *ao, void **data, int samples, bool *eof)
// pad with silence (underflow/paused/eof)
for (int n = 0; n < ao->num_planes; n++) {
af_fill_silence((char *)data[n] + pos, (samples - pos) * ao->sstride,
af_fill_silence((char *)data[n] + pos * ao->sstride,
(samples - pos) * ao->sstride,
ao->format);
}