Skip to content

Commit

Permalink
Reduce needless precision in audio note frequency calculation (qmk#21496
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Nebuleon authored and autoferrit committed Dec 6, 2023
1 parent ea18c47 commit 3817258
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quantum/process_keycode/process_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ float voice_change_song[][2] = VOICE_CHANGE_SONG;

float compute_freq_for_midi_note(uint8_t note) {
// https://en.wikipedia.org/wiki/MIDI_tuning_standard
return pow(2.0, (note - 69) / 12.0) * PITCH_STANDARD_A;
return powf(2.0f, (note - 69) / 12.0f) * PITCH_STANDARD_A;
}

bool process_audio(uint16_t keycode, keyrecord_t *record) {
Expand Down

0 comments on commit 3817258

Please sign in to comment.