Version 4.2.1

This commit is contained in:
Gary Scavone
2009-03-24 23:02:14 -04:00
committed by Stephen Sinclair
parent a6381b9d38
commit 2cbce2d8bd
275 changed files with 8949 additions and 6906 deletions

22
rawwaves/sine.c Normal file
View File

@@ -0,0 +1,22 @@
// Utility to make a rawwave sine table (assumes big-endian machine).
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define LENGTH 1024
#define PI 3.14159265358979323846
void main()
{
int i,j;
double temp;
short data[LENGTH + 2];
FILE *fd;
fd = fopen("sinewave.raw","wb");
for (i=0; i<LENGTH; i++)
data[i] = 32767 * sin(i * 2 * PI / (double) LENGTH);
fwrite(&data,2,LENGTH,fd);
fclose(fd);
}