Skip to content

Commit

Permalink
Remove needless precision in additive DAC sample generation (qmk#21498)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebuleon authored and akeep committed Oct 2, 2023
1 parent 1c7b7a1 commit 2b2df8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platforms/chibios/drivers/audio_dac_additive.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ __attribute__((weak)) uint16_t dac_value_generate(void) {
* timer runs with 3*AUDIO_DAC_SAMPLE_RATE; and the DAC callback
* is called twice per conversion.*/

dac_if[i] = fmod(dac_if[i], AUDIO_DAC_BUFFER_SIZE);
dac_if[i] = fmodf(dac_if[i], AUDIO_DAC_BUFFER_SIZE);

// Wavetable generation/lookup
uint16_t dac_i = (uint16_t)dac_if[i];
Expand Down

0 comments on commit 2b2df8d

Please sign in to comment.