GPIO signal when audio is playing / stopped

hello,

i have built my volumio raspberry with hifiberry dac into my old revox-amp which is a fantastic solution for wireless music streaming and listening.
only thing missing is the feature that the amp gets turned on / off depending if there is music playing.
I have found some other posts about that but none really provided enough intel for me.
The plan is to use the GPIO to control a relay ( hardware is ok and has been running with an arduino before ) .
The only thing I dont not know is how to detect if there is currently sound playing.
Is there some kind of api or hook in volumio’s code for that?

thanks a bundle!