0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-16 11:15:06 +00:00

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

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 */