Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
662 kaklik 1
#include <math.h>
2
#include <stdio.h>
3
 
4
 
5
int main()
6
{
7
FILE *out;
8
 
9
const int rate=44100; 
10
 
11
int pole[1000];
12
unsigned int n,i;
13
double t;
14
 
15
  for(n=0;n < 1000;n++){
16
    t = 200.0 * (double) n/ (double)rate;
17
    pole[n] = (short) round(1000*sin(2*M_PI*t));
18
  }
19
 
20
  out=fopen("./output.txt","w");
21
  for(i=0;i < 1000;i++) fprintf(out,"%3d \n",pole[i]); 
22
  fclose(out);
23
}