I'm using a Rpi3 with HifiBerry DAC+
I have a relay, that turns on and off my amplifier, connected to GPIO pin.
I have a script running in the background that takes care of turning off and on the amplifier, whit this line:
mpc status | grep playing > /dev/null
However, when I use airplay, the music player daemon is not used, and therefore the amp is turned off by the script.
Is there a similar command line interface to the airplay like the one above for mpc?
So it would something like this:
if [ mpc status | grep playing > /dev/null ] || [ airplay status | grep active ]; then
#set GPIO high