Re: [LAU] OT(ish): Strange coding problem (audio related)

From: Gabriel M. Beddingfield <gabrbedd@email-addr-hidden>
Date: Fri Jan 28 2011 - 16:31:19 EET

On Fri, 28 Jan 2011, Peter Nelson wrote:

>> First, should probably check if the value should be floor()'d or
>> round()'ed. The "fix" I have above is rounded... but I haven't dug in
>> to the algo see if it should actually be floored().
>
> I wouldn't use the log operation at all:
>
> for (k = 0, le = 2; (1 << k) < fftFrameSize; k++)

FTW!

Not only is this a cool trick, but I think it's the Right
Answer.

Peace,
Gabriel

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Fri Jan 28 20:15:01 2011

This archive was generated by hypermail 2.1.8 : Fri Jan 28 2011 - 20:15:01 EET