how to mix two audio channels?

后端 未结 2 1134
耶瑟儿~
耶瑟儿~ 2021-01-01 04:49

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 t

相关标签:
2条回答
  • 2021-01-01 05:21

    Stereo PCM is just left and right interleaved, first all the bytes for one sample of the left channel then all the bytes for one sample on the right channel.

    0 讨论(0)
  • 2021-01-01 05:31

    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.

    0 讨论(0)
提交回复
热议问题