From 8ec3f8e82acd70410515550fd1790ee5827aafdb Mon Sep 17 00:00:00 2001 From: sanine Date: Fri, 26 Aug 2022 12:17:51 -0500 Subject: make sound --- examples/example.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'examples/example.c') diff --git a/examples/example.c b/examples/example.c index 960b9f2..9ae3acc 100644 --- a/examples/example.c +++ b/examples/example.c @@ -1,14 +1,44 @@ +#include +#include #include #include +#define PI 3.14159 + #define SAMPLE_RATE 44100 #define N_CHANNELS 8 int main() { - mr_init(SAMPLE_RATE, N_CHANNELS); - Pa_Sleep(3000); - mr_terminate(); + float sin1[SAMPLE_RATE]; + const int f1 = 440; + float sin2[SAMPLE_RATE]; + const int f2 = 512; + for (long i=0; i