Mixing PCM Audio Samples

I have a simple question regarding mixing multiple PCM samples.

I read that the best way to mix multiple PCM audio samples is to take the average number of samples in each frame.

So, if I add together, say 5 16-bit samples, before dividing by 5, it is obvious that it will have more value than can be enough for 16 bits.

So, when mixing multiple 16-bit samples, do I save them all in int first and add them and average and then convert them back to short?

+3
source share
2 answers

If you want to mix audio samples, you simply add them together. Building an average is not the right way to do this.

: - , , ? . . .

PCM . - " ", PCM. , 16 .

, .

, - 16- . , , .

+4

, . , , 32 64 . ,

enter image description here

enter image description here

0

All Articles