\r
for (i=0;i<PARAM_N_t;i++)\r
{\r
- int value = to_fixed(sin((float)i*2*M_PI/PARAM_N_t));\r
+ /* We take the sine from 0 to 2*2*Pi, ie two periods. We divide \r
+ * the value by PARAM_N_t to prevent overflow. */\r
+ int value = to_fixed(sin((float)i*2*2*M_PI/PARAM_N_t)/PARAM_N_t);\r
\r
if (i<PARAM_N_t/2)\r
{\r