On Sat, 19 Apr 2008, a...@hotmail.com wrote:
> They say that i must divide shorts by 32768 to get
floats.
That's true. Just remember to convert to floats before division. In C it
looks like:
float_sample = (float)short_sample * 3.05175781e-05;
I've used multiplying by (1/32768) instead of division, as most processors
are faster at multiplication than division.
> But how should I put my processed floats back ?
Just multiply them by 32768 and then cast to shorts. Assuming your filter
never produces samples out of <-1.0; +32767/32768> range. It is easily
achieved with normalized FIR.
--
Grzegorz Kraszewski
http://teleinfo.pb.edu.pl/~krashan