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

Sanjeev Sharma throwit1 at gmail.com
Thu Nov 27 03:56:39 PST 2008


I've tried this now from 2 angles, through pulseaudio and through Alsa


in pacmd
 load-module module-ladspa-sink sink_name=ladspa_out
master=alsa_output.pci_1102_2_sound_card_0_alsa_playback_0
plugin=fast_lookahead_limiter_1913  label=fastLookaheadLimiter
control=-1,-5,2,0,,,,,

_____
gives the error
D: module-ladspa-sink.c: Module: fast_lookahead_limiter_1913
D: module-ladspa-sink.c: Label: fastLookaheadLimiter
D: module-ladspa-sink.c: Unique ID: 1913
D: module-ladspa-sink.c: Name: Fast Lookahead limiter
D: module-ladspa-sink.c: Maker: Steve Harris <steve at plugin.org.uk>
D: module-ladspa-sink.c: Copyright: GPL
D: module-ladspa-sink.c: Ignored control output port "Attenuation (dB)".
E: module-ladspa-sink.c: Found audio input port on plugin we cannot handle:
Input 1
E: module.c: Failed to load  module "module-ladspa-sink" (argument:
"sink_name=ladspa_out
master=alsa_output.pci_1102_2_sound_card_0_alsa_playback_0
plugin=fast_lookahead_limiter_1913  label=fastLookaheadLimiter
control=-1,-5,2,0,,,,,"): initialization failed.
__________________________________________________
I've tried all kinds of values for the control= string.


In Alsa I tried a .asoundrc file almost identical to the one given on some
web pages (I must not have used the right Google search terms before)

This is what it looks like right now - I've been tweaking it to get it to
work right.

pcm.limit {
      type ladspa
      slave.pcm "plughw:0,0";
      #slave.pcm "default";
      path "/usr/lib/ladspa";
      plugins [
          {
              label fastLookaheadLimiter
              input {
               #InputGain(Db) -20 -> +20 ; Limit (db) -20 -> 0 ; Release
time (s) 0.01 -> 2
           inputgain 0; limit -5; release 0.1; Attenuation 0;
               controls [ 0 -5 0.1 0 ]
              }
          }
     ]
}


AND HERE IS what this gives me


$ mplayer mp3file.mp3  -ao alsa:device=limit
MPlayer 1.0rc2-4.2.3 (C) 2000-2007 MPlayer Team
CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 47, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.

Playing 063_Unwavering_Samadhi-a.mp3.
Audio file file format detected.
==========================================================================
Forced audio codec: mad
Opening audio decoder: [libmad] libmad mpeg audio decoder
AUDIO: 44100 Hz, 1 ch, s16le, 64.0 kbit/9.07% (ratio: 8000->88200)
Selected audio codec: [mad] afm: libmad (libMAD MPEG layer 1-2-3)
==========================================================================
[AO_ALSA] alsa-lib: pcm_ladspa.c:1271:(snd_pcm_ladspa_parse_controls) Unable
to find an control port (3)
[AO_ALSA] Playback open error: Invalid argument
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video


Exiting... (End of file)



Any further hints would be appreciated.


On Tue, Nov 25, 2008 at 4:48 AM, Sanjeev Sharma <throwit1 at gmail.com> wrote:

> OK, I'll start playing with these
>
>
>
> ls /usr/lib/ladspa/ | grep limit
> fast_lookahead_limiter_1913.so
> hard_limiter_1413.so
>
>
> On Tue, Nov 25, 2008 at 3:41 AM, David Kågedal <davidk at lysator.liu.se>wrote:
>
>>
>> You could use LADSPA to insert a limiter or compressor between the
>> source and the output.
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20081127/5691ddb4/attachment.htm>


More information about the pulseaudio-discuss mailing list