Q:

How to overlap two RAW audio signal

I hope I can find some help here.
I have started working on a little project concerning voice recordings. What I would like to is: given two audio files in RAW format (or WAV, as long as I can convert them to arrays of bytes), I would like to overlap them, that it get the RAW signal that is roughly equivalent to playing them at the same time.
Being the complete newbie that I am at signal processing, the first thing I've tried, as soon as I was able to turn my files into arrays, was to average them arithmetically ((x+y)/2) and geometrically (sqrt(x*y)). Clearly both approaces return a shriek from hell. Now I was looking into convolutions, but I don't think it is the way to go. Last I thought I could go with FFT, sum themin the transform space and then convert back, but I'm not quite sure. So here goes:
How can I overlap two RAW audio signals? That is, given two audio signals that sound good by themselves, how can I produce a new audio signal that sounds as if the former were being played at the same time?
Hope it is possible to do it using RAW audio, but other suggestions are appreciated. Thanks

A:

Adding the signals in time domain(sample by sample addition) while ensuring they don't add up to saturate will give you the desired effect. operation is adding and normalizing(like arithmetic mean). in question it is mentioned that taking mean is not giving desired results, this puzzles me. if i understand the desired effect properly then, adding element by element in time domain and normalizing it should do.

