I don’t intend to take away from your work but suggest another possible simpler alternative if you use the Smart Touch Pro (STP) app. Which I discovered on the old RASW site from Sonia.
This shot shows the STP app on my screen. (It overlays every screen and thus can activate the apps shown from any screen.)
This shot shows the STP app opened up to display some of the apps available that you have selected. The Volume Control app is displayed,
When you tap on that icon the Vol Control app opens up so you can adjust the volume level of each function. (You can slide the app up to also display adjustments for Ringtone and Call.) You can also mute using the icon in the lower right corner.
To go back to the previous app you were using you just use the back button…