Open es20490446e opened 5 years ago
@FFY00 Do you have an idea how this could be implemented? (Without checking all the time if the sinks changed?)
Edit: It would be easy with module-combine-sink (if the sinks are known before), but I'd like it to also work with bluetooth devices that just connect.
Yeah, we should be able to use pactl subscribe
.
@FFY00 ah okay. This needs the tool to run permanently and the enable-config
could not enable this solely within the pulseaudio config.
We can definitely spawn a background process when we are running the script. However, as I feel this might be a bit problematic and/or undesirable, I plan to also let the user manually select which sink (or possibly, sinks) he/she wants to run the equalizer on.
I found a solution which works for me, using filter-apply. https://gist.github.com/brandsimon/d5e5d5d82ed36f328f3db4dca3da0935
Believe me, using pactl subscribe
is a PITA and the solution is never robust enough, this because of event/card creation event sequences and precise timing. I must say I've implemented a working solution for a more complicated scenario, not only reenabling the equalizer but also setting a2dp profile, muting sinks, etc. It wasn't a happy experience at all!
If @brandsimon works, couldn't that be implemented in a more dynamic fashion so that the equalizer preset in not harcoded?
See https://github.com/pulseaudio-equalizer-ladspa/equalizer/issues/37 for what I believe is a saner approach.
https://youtu.be/LFq9bpctb48