From 821db155f20f441c2d3aa6ff4e10878bfccdf45c Mon Sep 17 00:00:00 2001 From: Nebuleon <2391500+Nebuleon@users.noreply.github.com> Date: Thu, 27 Jul 2023 00:00:27 -0400 Subject: [PATCH] Fix stuck note with square wave in additive DAC (#21589) --- platforms/chibios/drivers/audio_dac_additive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platforms/chibios/drivers/audio_dac_additive.c b/platforms/chibios/drivers/audio_dac_additive.c index 0f29755d1a..419c8be230 100644 --- a/platforms/chibios/drivers/audio_dac_additive.c +++ b/platforms/chibios/drivers/audio_dac_additive.c @@ -66,7 +66,7 @@ static const dacsample_t dac_buffer_triangle[AUDIO_DAC_BUFFER_SIZE] = { #endif // AUDIO_DAC_SAMPLE_WAVEFORM_TRIANGLE #ifdef AUDIO_DAC_SAMPLE_WAVEFORM_SQUARE static const dacsample_t dac_buffer_square[AUDIO_DAC_BUFFER_SIZE] = { - [0 ... AUDIO_DAC_BUFFER_SIZE / 2 - 1] = 0, // first and + [0 ... AUDIO_DAC_BUFFER_SIZE / 2 - 1] = AUDIO_DAC_OFF_VALUE, // first and [AUDIO_DAC_BUFFER_SIZE / 2 ... AUDIO_DAC_BUFFER_SIZE - 1] = AUDIO_DAC_SAMPLE_MAX, // second half }; #endif // AUDIO_DAC_SAMPLE_WAVEFORM_SQUARE