calculate NOTE_PERIOD based on sampling rate (thanks asie)
This commit is contained in:
parent
a07f5341bf
commit
b25e3e599d
|
@ -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 */
|
||||||
|
|
Loading…
Reference in New Issue