Definition in file sinus.c.
#include "sinus.h"

Go to the source code of this file.
Functions | |
| short | sin_table (long rad) |
| Function for looking up in the table and give a value for sin(x). | |
Variables | |
| signed short | sound_table [SINUS_SAMPLES] |
| short sin_table | ( | long | rad | ) |
Function for looking up in the table and give a value for sin(x).
| rad | Position on the circle in radians. |
Definition at line 119 of file sinus.c.
References SINUS_SAMPLES, and sound_table.
Referenced by main().
00120 { 00121 long index = rad; 00122 00123 if (index < 0) { 00124 index *= -1; 00125 } 00126 00127 return sound_table[index % SINUS_SAMPLES]; 00128 }
| signed short sound_table[SINUS_SAMPLES] |
1.5.5