Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Run Script with play button (yet another...)
#8
Hi Matthias,

if you stick to mpd listening (no bluetooth, airplay which directly access alsa) and you are familiar with C coding, there is a callback function. You can write a sort of custom client to mpd with libmpdclient. After establishing a connection to the running mpd session you can exec "mpd_run_idle()" which set your program to sleep state until mpd change the current state. After wake up you can read the new mpd state with "mpd_run_status" and decide what to do. With signal usage you should also to be able to handle the power off delay. But this might lead to some debug sessions...

Regards
Markus
Reply


Messages In This Thread
RE: Run Script with play button (yet another...) - by effect06 - 10-28-2019, 07:06 PM

Forum Jump: