My PC is connected to an audio amplifier that I can switch on or off over the network.  I would like to set things up to switch it off automatically after no audio has been playing for 10 minutes.I found some similar questions here which advised looking at /proc/asound/card*/pcm*/sub*/status to check for the word RUNNING which indicates audio is being output, however many programs seem to leave their audio running even when they aren't making any noise, just outputting silence.  I have noticed that some Python programs do this, as does Firefox when run through apulse.This means that I cannot detect via /proc/asound/ when there is no audio coming out of the speakers, as it is permanently RUNNING.Is there another way to detect when the only audio signal being played is silence?  Is there some way to record or otherwise intercept ALSA output, even when a hw device is the one in use?
Detecting when only silence is being played
alsa