(07-07-2024, 01:57 AM)Tim Curtis Wrote: I have no idea how plexamp works but below is the code thats used to check whether its running or not
Code:pgrep -a node | grep plexamp
This run state is checked every 3 seconds by /var/www/daemon/worker.php. If it's running then moOde displays the "Plexamp Active" overlay.
I assume a node is always running due to Plexamp service needs that for listening.
but we can check its playing status from the list of applications accessing any sound cards as per below:
pi@moodeEdifier:~ $ lsof /dev/snd/*
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 168284 pi mem CHR 116,6 463 /dev/snd/pcmC2D0p
node 168284 pi 39u CHR 116,7 0t0 464 /dev/snd/controlC2
node 168284 pi 40u CHR 116,6 0t0 463 /dev/snd/pcmC2D0p
As I checked it stops using them after about 13-14 seconds and ALSA is free after that.
I hope this is something usable for checking real Plexamp status.
Any suggestions? @vinnn