how to mix two audio channels?

Andriy Tylychko picture Andriy Tylychko · Dec 31, 2010 · Viewed 7.6k times · Source

I have two mono audio channels (pcm format) of audio call, incoming and outgoing. how to mix them? how to position them in space? (e.g. incoming channel sounds slightly on the left and outgoing on the right)

Answer

groovingandi picture groovingandi · Dec 31, 2010

Mixing is just a weighted addition of both signals. So if you want them to be equal in one mono signal, lower both signals by a factor of 2 and add them. If you want to position them in the stereo space, use different weighting on the left and right channel. For example 0.6 of signal 1 and 0.4 of signal 2 on the left channel and vice versa on the right channel will do the trick. For better results, a slight timeshift would be necessary, but that depends on your needs.