Moving the global muting logic to a shared helper method

I noticed there was some shared logic in there (while debugging some stuff in my own project)

Let me know if there's something I can improve.