Commit Graph
7 Commits
Author SHA1 Message Date
Nebuleon 1d94de5358 Optimize the additive DAC code, fixing performance-related hangs (#21662) 2023-09-25 12:26:02 +10:00
Nebuleon f0c9453083 audio: Don't play the first note of zero-note melodies (#21661) 2023-08-02 17:07:43 +01:00
Nebuleon 96789a7cb0 Unify MIDI note calculation with the audio feature's algorithm (#21588) 2023-07-27 16:14:34 -07:00
Nebuleon e971ce290c Remove needless precision in additive DAC sample generation (#21498) 2023-07-26 21:06:14 -07:00
Nebuleon 9bc85ff5af Reduce needless precision in audio note frequency calculation (#21496) 2023-07-26 21:05:26 -07:00
Nebuleon 821db155f2 Fix stuck note with square wave in additive DAC (#21589) 2023-07-26 21:00:27 -07:00
Nebuleon a5e33b1c28 Allow the user to select one tone for the additive DAC (#21591)
Previously, if the user tried to use `#define AUDIO_MAX_SIMULTANEOUS_TONES 1` to conserve CPU time, their firmware would fail to build with this error:

```
platforms/chibios/drivers/audio_dac_additive.c:91:73: error: excess elements in array initializer [-Werror]
   91 | static float   active_tones_snapshot[AUDIO_MAX_SIMULTANEOUS_TONES] = {0, 0};
      |                                                                          ^
```

This also affected the preset `#define AUDIO_DAC_QUALITY_VERY_HIGH`, which called up only one simultaneous tone at 88200 Hz.
2023-07-23 11:44:41 +01:00