Is there a way to adjust all volume setting with kotlin

Idea

The idea is to create a server to control the audio of my mac and windows through a mobile application. For example, a small server running on my windows, and I’m not right behind my pc while gaming with a controller. I can just take my phone and adjust the volume of the game to be quieter and my music to be louder.

what I’ve done

Mostly research, There are many drivers WASAPI, CoreAudio to name a couple. I couldn’t find a way to interact with them. Someone else suggested using java sound API and not having any luck with controlling the audio. I’m able to see the audio inputs and outputs but no luck with controlling them.

Any suggestions or help would be awesome.