Blame | Last modification | View Log | Download
#include <math.h>
#include <stdio.h>
int main()
{
FILE *out;
const int rate=44100;
int pole[1000];
unsigned int n,i;
double t;
for(n=0;n < 1000;n++){
t = 200.0 * (double) n/ (double)rate;
pole[n] = (short) round(1000*sin(2*M_PI*t));
}
out=fopen("./output.txt","w");
for(i=0;i < 1000;i++) fprintf(out,"%3d \n",pole[i]);
fclose(out);
}