I'm a newbie C# coder and as part of my learning process I would like to build a desktop Windows app. The app basically detects if a certain app (web browser, iTunes, VLC, etc) is currently playing audio. If another running app starts playing audio at the same time, the app I wish to make would automatically temporarily turn down the audio volume from one of the apps. When the aduio from the second app stops playing audio, the audio would then return to its original level.
EG:
I'm playing music in iTunes
I start watching a YouTube video in Chrome
iTunes reduces its volume level (the music keeps playing at lower volume)
I finish watching the YouTube video
iTunes returns to its original volume level
I'm not sure if this app if possible to build as it may require deep OS integration. I've searched for ".net detect audio" but have found nothing. It may be beyond the limits of .net.
The app would also require .net to be able to adjust the audio level on an app by app basis as well as detecting it!
This is my first question on Stack Overflow. I've had this idea for several years now and have only recently started learning to code. I would love to produce this app as a portfolio piece, as well as release it as freeware online!
Thank you in advance.