[pulseaudio-discuss] volume limiter - is this possible in pulseaudio?

Sanjeev Sharma throwit1 at gmail.com
Mon Nov 24 16:49:14 PST 2008

I don't know how to do this but one way could be

send all of pulseaudio's outputs to sox.  Sox applies the compander effect

 sox -q -t wav $WAV_PIPE  -t ao pulse compand 0.001,1
-inf,-inf,-25,-inf,-25,-15,0,-13 2 -90 .1

This command
1. drops all sound quieter than -25 db
2. sounds from -25db to 0 db  (max sound level) get squished down into the
range -15db to -13db.

there are lots of problems with this, though.  Sox keys its playback off the
first sample.  if any subsequent samples are at different rates, they'll
play faster and higher pitched, or slower and lower-pitched

On Mon, Nov 24, 2008 at 5:18 AM, Michal Sawicz <michal at sawicz.net> wrote:

> Dnia 2008-11-23, nie o godzinie 23:41 +0000, Colin Guthrie pisze:
> > You just need to set the hardware volume of the sink. You can do this
> > in
> > pavucontrol under the device, not the stream.
> I think you misunderstood, what you can set in the volume control is,
> actually, amplification. It always multiplies the 'incoming' volume by a
> set amount.
> What Sanjeev meant, is that he would like to limit the outgoing volume
> regardless of the input volume, so actually he meant compression.
> --
> Michal Sawicz <michal at sawicz.net>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20081124/2559830c/attachment.htm>

More information about the pulseaudio-discuss mailing list