Skip to content

Commit 9a0d1c2

Browse files
committed
Only reset buffer if output is enabled.
1 parent f1e6f01 commit 9a0d1c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ports/raspberrypi/audio_dma.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ audio_dma_result audio_dma_setup(
243243
dma->input_register_address = input_register_address;
244244
dma->swap_channel = swap_channel;
245245

246-
audiosample_reset_buffer(sample, single_channel_output, audio_channel);
246+
if (output_register_address) {
247+
audiosample_reset_buffer(sample, single_channel_output, audio_channel);
248+
}
247249

248250

249251
bool single_buffer; // True if data fits in one single buffer.

0 commit comments

Comments
 (0)