#include
#include
#include
#define FQ 1000
#define AM 1000
#define PI 3.14
int main()
{
FILE *stream;
int i=0,j=0;
double value=0,bb=0;
short gg[1000];
stream=fopen("sine_wave.raw","wb");
value=(2*PI/8);
for(i=0;i<1000;i++)
{
bb=AM*sin(value*i);
gg[i]=(short)bb;
//fprintf(stream,"%d/n",gg);
}
fwrite(gg, 2, 1000,stream);
fclose(stream);
return;
}