Hi there !
First a bit of context :
I’m developping a Real Time denoising application with Jack API backend, it got several threads running and can fully occupy up to 2/4 cores of my rpi 3b+.
I’d like to control the noise reduction with the button so I created a DBus target in my programm, and made a little executable which sends a method call over DBus to the target.
The executable works perfectly fine and successfully change the application parameter on the run.
Here is my problem :
I created a shell script which call this executable and put it in the scripts directory. I’ve modified the .conf file to make a 1-click on the button call this script.
But I’m having several bugs :
Just after boot, there is already the pisound-btn executable running as root in background. I assume it is autolaunched by the pisound config (however I couldn’t find any ressources about it) and it is the one used in the following tutorial https://blokas.io/pisound/docs/the-button/#a-quick-tutorial as they don’t seems to run pisound-btn explicitly. But in my case, this already running script is not reacting to any of my button interaction.
I then tried to run pisound-btn by myself. At first it worked well, even though a bit verbose (printing every shell script it is executing). But sometimes, when I kill and restart my own application, the pisound-btn executable stops working. It doesn’t respond to any button click until my application is killed. As mentionned here The Button unresponsive when pd gets busy, I thought it may be than my RT application is so high priority it doesn’t let the btn executable run at any time.
But I got 2 cpus cores not used, more than 50% of free RAM, so I don’t get why it would lack ressources. Also, I recompiled the pisound-btn with debug option to see what is happening and it seems the main loop is running, but it simply doesn’t detect the change in button state (line 678 of pisound-btn.c).
Does someone knows or simply have a clue about what is going on there ?