[linux-audio-dev] Combining audio streams

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Combining audio streams
From: Christian Naeger (naeger_AT_web.de)
Date: Fri Feb 08 2002 - 17:37:56 EET


Hi,

I am new to audio programming, so please excuse that I am asking the basics
here, but I could not find an answer elsewher in the web (probably because
its too simple :-)

I have written a few applications which need to output audio at the same
time. So I need a simple audio mixer which combines the different audio
streams (all are 16kHz, 16bit, signed linear) and writes them to /dev/dsp.
How can I do this?

If there are say two input streams, and I simply add the 16bit shorts from
both streams, I get lots and lots of overflows. If I divide each stream by
two before adding them, it sounds very bad.

I know that arts and esd can do this without loss of quality. How is this
done there (I tried to read arts' source but that didn't help)?

Any help is greatly appreciated, Chris


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Feb 08 2002 - 17:35:31 EET