calculate NOTE_PERIOD based on sampling rate (thanks asie)

This commit is contained in:
Sigrid Solveig Haflínudóttir 2021-05-19 07:30:39 +00:00
parent a07f5341bf
commit b25e3e599d
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE. WITH REGARD TO THIS SOFTWARE.
*/ */
#define NOTE_PERIOD 0x10000 #define NOTE_PERIOD (SAMPLE_FREQUENCY * 0x4000 / 11025)
#define ADSR_STEP (SAMPLE_FREQUENCY / 0xf) #define ADSR_STEP (SAMPLE_FREQUENCY / 0xf)
/* clang-format off */ /* clang-format off */