swh / ladspa

The SWH Plugins package for the LADSPA plugin system
http://plugin.org.uk/
GNU General Public License v2.0
230 stars 52 forks source link

mbeq plugin flat mode volume differs from volume without the plugin #70

Open AstroKosmoNaut opened 4 years ago

AstroKosmoNaut commented 4 years ago

I'm using the mbeq plugin through pulseaudio-equalizer-gtk. When the GUI has been configured for flat EQ and then enable the equalizer, I hear a significant increase in volume level. This makes it harder to objectively tell any differences when you actually apply EQ in one or more of the bands: the difference in volume already changes the perceptions.

Is there a way to make the plugin behave in such a way that flat settings do not alter the sound at all, as is typically the case with a standalone audio equalizer?

swh commented 4 years ago

It should be possible yes, as long as the "0" position has a flat frequency response, it should be possible to just scale back the output level.

I can't honestly remember how it works though.

jerryr commented 3 years ago

I had the same problem and setting CFLAGS="-O0" fixed it for me too. I was getting the same scratchy sound and also noticed that it took several seconds for the plugin to initialize, during which one CPU was stuck at 100%.

Edit: sorry, this comment belongs in #64 . Typed it out here by mistake. Apologies!

swh commented 3 years ago

That's really interesting - it suggests a compiler bug?

Most likely there's some unsafe numerical optimisations / rounding errors happening.

jthadden commented 3 years ago

AstroKosmoNaut using pulseaudio-equalizer-gtk can lead to this as it is copying the master volume to the new, virtual sink and then forces the master volume to 100%. You can change this behaviour by editing /usr/bin/pulseaudio-equalizer. Search for the line PA_REAL_PREAMP_FLOAT=$(echo "$PA_PREAMP65536" | bc) and change it to PA_REAL_PREAMP_FLOAT=$(echo "$PA_PREAMP(65536*0.8)" | bc) to set the master volume to 80% only.