bmc0 / dsp

An audio processing program with an interactive mode.
ISC License
219 stars 31 forks source link

Difficulty reloading dsp config #31

Closed exaiyo closed 6 years ago

exaiyo commented 6 years ago

From wiki: "Currently, the configuration file is not reloaded when it is changed. In order to reload the configuration file, the plugin must be reinitialized. If you're using PulseAudio, you can accomplish this by either unloading and reloading the LADSPA module"

I tried to unload then reload module, but this resulted in the dsp sink being suspended which in effect disables the dsp. Then I tried to suspend the sink, and resume the sink, but that didn't seem to work either. In the meantime I've just been restarting pulseaudio but this isn't ideal for my needs (many dsp settings for different listening positions, speakers, etc) I've cobbled together a simple script to allow me to switch dsp config on the fly, but it would be nice if I didn't need to restart pulseaudio every time I change configs. Restarting pulse means it will stop the audio stream for apps like cmus, or worse, with mpv open, pulseaudio cannot be restarted successfully.

pactl suspend-sink dsp 1
pactl unload-module module-ladspa-sink
pactl load-module module-ladspa-sink sink_name=dsp sink_master=alsa_output.pci-0000_06_01.0.iec958-stereo plugin=ladspa_dsp label=ladspa_dsp
pactl set-default-sink dsp
pactl suspend-sink dsp 0

Any idea what I might be doing incorrectly? I love the work you've done here, it has greatly helped my transition from windows to linux! If this is the incorrect place to ask for help, I apologize, I could not find the alternative.

Thanks!

bmc0 commented 6 years ago

I've intended to make it reload the configuration automatically for a while, but I haven't gotten around to implementing it yet...

One thing you could do would be to create multiple sinks, each with its own configuration file (see the README and issue #14), and then use a script to switch between sinks (see this link for some examples).

bmc0 commented 6 years ago

I'm going to close this for now since you haven't given any feedback. Feel free to re-open if using multiple sinks like I suggested isn't working for you.