10-28-2019, 07:06 PM
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
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