On Fri, 12 Nov 2010 23:45:56 +0100 Arnold Krille <[email protected]> wrote:
> On Friday 12 November 2010 17:47:08 gene heskett wrote: > > On Friday, November 12, 2010 11:43:42 am Eric Kampman did opine: > > > On Nov 12, 2010, at 1:40 AM, Jens M Andreasen wrote: > > > > On Thu, 2010-11-11 at 20:22 -0800, Eric Kampman wrote: > > > >> Since power is proportional to signal squared, this means .. > > > >> .. L(t) = cos(t * pi / 2) and R(t) = cos((1 - t) * pi / 2) > > > > > > > > I think you misspelled one sin(), no? > > > > > > No, turns out the 2nd equation is equivalent to sin(t * pi / 2) I think. > > > > And is computationally less expensive if you drop the pi / 2 and use > > pi * 0.5 as mulls cost less than divs. Or at least this is true if its not > > handed off to an FP processor. ;-) > > Even faster: Use a pre-computed value of pi/2 or pi*0.5. I don't think > compilers will already optimize such a constant part of an equation. > > Arnold Why not go the whole hog and use a pre-calculated look-up table for the whole thing? You will only want a limited number of points, and then only from centre to one side - the other is of course mirror image. -- Will J Godfrey http://www.musically.me.uk Say you have a poem and I have a tune. Exchange them and we can both have a poem, a tune, and a song. _______________________________________________ Linux-audio-dev mailing list [email protected] http://lists.linuxaudio.org/listinfo/linux-audio-dev
