Re: [linux-audio-dev] Mixing signals

From: Alfons Adriaensen <fons.adriaensen@email-addr-hidden>
Date: Mon May 23 2005 - 12:18:50 EEST

On Mon, May 23, 2005 at 10:45:51AM +0200, Viceic Predrag wrote:

> 1) sum L and R and divide by 2 : well..
>
> 2) if L>0 and R>0 take the max, if L<0 and R<0, take the min, else add. :
> current implementation
>
> 3) add, and then normalize to the max after summation.

Options 2 and 3 are not linear and will introduce distortion. Depending
on what you original signals are, this may be benign, or render your
signal completely useless.

The only linear way of doing this (assuming both channels have the same
gain), is sum = a * (L + R). The value of a here is debatable, something
between 0.5 and 0.75 will do in most cases.

-- 
FA
Received on Mon May 23 16:15:08 2005

This archive was generated by hypermail 2.1.8 : Mon May 23 2005 - 16:15:08 EEST