-
Hey! I had some special scripts running to automatically turn off my speakers when nothing is playing. The script basically looked for specified processes' CPU load and decided then whether something is playing or not. Well, now my Raspberry Pi 5 is too fast so this method doesn't work anymore ... triggering all the time when it shouldn't. I'd love to continue to use a script that has a hook to shairport's (and librespot's) functionality (which then triggers my Zigbee powersocket to turn on/off accordingly). Maybe anyone knows a smart way to detect whether audio is playing? Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Have you considered using the active start and active end hooks? |
Beta Was this translation helpful? Give feedback.
-
yes, but I am using these for librespot as well... and I want to check whether something is playing on both to interrupt the turning off |
Beta Was this translation helpful? Give feedback.
-
Okay, I got it. I made a script that sets a flag into a file that gets read every time an app tries to turn off the speaker (and doesn't when the other is still playing / having the flag set to 1). |
Beta Was this translation helpful? Give feedback.
Okay, I got it.
I made a script that sets a flag into a file that gets read every time an app tries to turn off the speaker (and doesn't when the other is still playing / having the flag set to 1).