I have two raw sound streams that I need to add together. For the purposes of this question, we can assume they are the same bitrate and bit depth (say 16 bit sample, 44.1k
convert the samples to floating point values ranging from -1.0 to +1.0, then:
out = (s1 + s2) - (s1 * s2);
Will introduce heavy distortion when |s1 + s2| approach 1.0 (at least when I tried it when mixing simple sine waves). I read this recommendation on several locations, but in my humble opinion, it is a useless approach.
What happens physically when waves 'mix' is that their amplitutes add, just like many of the posters here suggested already. Either