[pulseaudio-discuss] Mixing streams

Lennart Poettering lennart at poettering.net
Thu Nov 15 05:56:47 PST 2007


On Thu, 15.11.07 14:55, Tanu Kaskinen (tanuk at iki.fi) wrote:

> On Wed, Nov 14, 2007 at 09:56:19AM -0800, Dennis Fleming wrote:
> > I have noticed that in pa_mix streams are clipped when they exceed the
> > threshold.  Has there been any discussion on normalizing the output
> > rather than clipping?  Or am I looking in the wrong place.
> 
> If I understood correctly, you would like PA to lower the
> volume whenever the sample values get too high while mixing.
> Should it then raise the volume back to original level after
> there has been quieter signal for a few seconds or something
> like that? I'd say that automatically turning the volume up
> and down isn't the solution. I might accept automatic
> "normalizing", if the volume stays down after there's been
> need to lower it. But that's not much better than just
> adjusting the stream volumes "manually" so that they don't
> clip in the first place.

I think normalizing a mixed stream is perfectly ligitimate. Don't
forget that normalization through DRC would only take effect when
otherwise we'd clip. So the option you have is not DRC vs non-DRC. But
it is clipping vs. DRC. And in this case DRC is certainly the smaller
evil.

> I put "manually" inside quotation marks, because the volumes
> can be adjusted automatically to a predefined level using
> module-match. I use it to set the default volume of all
> streams to about 50%. Maybe 50% could be the default,
> because at 100% clipping is quite probable with multiple
> streams.

Uh. That way you practically decrease the bit depth of your audio
output to 15 bit. (Unless you happen to have a 24 bit soundcard) Not
a very good idea for most people.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net         ICQ# 11060553
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list