Re: [linux-audio-dev] Mixing signals

From: Richard Spindler <richard.spindler@email-addr-hidden>
Date: Mon May 23 2005 - 12:44:53 EEST

On 5/23/05, Erik de Castro Lopo <erikd-lad@email-addr-hidden-nerd.com> wrote:
> > if (*p_A<0 && *p_B<0) {
> > *p_output =(*p_A+1)*(*p_B+1)-1;
> > } else {
> > *p_output =2*(*p_A+*p_B+2)-(*p_A+1)*(*p_B+1)-3;
> > }
>
> Why? What is this supposed to achieve and what's wrong with:
>
> *p_output = *p_A + *p_B;

It's some evil black magic that tries to avoid disortion. I'm not sure
whether it's the right way to do, but I was inspired by some website,
but i don't have the link anymore.
The original code-snippet performed a similar operation on integer-data.

-Richard
Received on Mon May 23 16:15:12 2005

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