The Windows application Discord glitched out and made it so that no other process is able to access the audio device. I wasn't able to play YouTube videos on any browser, play any music files, or use anything that requires the use of the audio device, unless I killed the Discord process. If I tried playing a video, the video would not play, and if I tried to play a song, The media player doesn't let me press the play button. How can a process completely hijack Windows audio? How does it stop other processes from utilizing audio output? Is there something in the Windows API that allows a process to take control of and lock an audio device, and prevent other processes from doing anything that make use of an audio device?
Note: would have commented but didn't have enough rep.
It is possible for a application to take exclusive control of an audio device.
Right click the volume icon on bottom right corner > Playback devices > Click on the audio device that is being hijacked > Properties > Advanced
In the exclusive mode box, try unticking both boxes, and see if it solves your problem.