Initial commit
This commit is contained in:
commit
91a1e2e312
22 files changed
+885
No files matched your search
@@ -0,0 +1,13 @@
|
||||
#include <stdint.h>
|
||||
#include "math.h"
|
||||
#define SAMPLE_COUNT 44100
|
||||
|
||||
static float SAMPLES[SAMPLE_COUNT];
|
||||
|
||||
float* get_samples() { return SAMPLES; }
|
||||
|
||||
void beep(uint32_t sample_rate, float freq) {
|
||||
for (int i = 0; i < SAMPLE_COUNT; ++i) {
|
||||
SAMPLES[i] = sintau((float)i * freq / (float)sample_rate);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user