4 #define SINLUT_SIZE 256
5 #define SINLUT_SCALE 32767.0
12 puts("\t.globl sinlut");
14 for(i=0; i<SINLUT_SIZE; i++) {
15 float t = (float)i / SINLUT_SIZE;
16 float theta = t * (M_PI * 2);
17 printf("\t.short %d\n", (int)(sin(theta) * SINLUT_SCALE));