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
