On Sat, Nov 13, 2010 at 09:07:35AM +0000, Folderol wrote:
> Why not go the whole hog and use a pre-calculated look-up table for the whole
> thing?
You only need to compute the L,R gains when they change.
Using a second order approximation such as the ones I
poster earlier is probably faster than a lookup table
in practice.
Here's one more:
p = panning position, 0...1
m = panning law control, 0...1
q = 1 - p
d = m * p * q
L_gain = q + d
R_gain = p + d
m = 0 -> -6 dB at center
m = 1 -> -2.5 dB at center
This takes three additions and two multiplications, which is peanuts.
Ciao,
-- FA There are three of them, and Alleline. _______________________________________________ Linux-audio-dev mailing list Linux-audio-dev@email-addr-hidden http://lists.linuxaudio.org/listinfo/linux-audio-devReceived on Sat Nov 13 16:15:02 2010
This archive was generated by hypermail 2.1.8 : Sat Nov 13 2010 - 16:15:02 EET