[linux-audio-dev] Simple Jack mixing problem

florentberthaut at no-log.org florentberthaut at no-log.org
Fri Jan 5 00:44:00 UTC 2007

Hi everyone,

I'm working on a sampler and i have a really silly problem.

I simply want to mix sounds in a stereo buffer within the jack "process"
So for each frame i sum the samples from each sound but then the values go
above 1 and i get clipping.
So my first thought was to divide by the number of samples playing, but it
ends up with a decrease in volume.
I tried to limit the values between -1 and 1 but it 's also clipping ->

I looked into some sources and it seems i would actually just have to sum
the samples.

Can anyone help me with that ?



More information about the Linux-audio-dev mailing list