How do I detect which processes are playing audio on my Windows machine? In other words, how do I enumerate processes which are using my sound card?
Hello,
Download process explorer from sysinternals (Microsoft). Once installed and in the interface click "find" "find handle or DLL"
In Vista I put in audioses.dll (Audio Session) and audioeng.dll (Audio Engine)
Either one will bring up a list of apps that can/do use the sound card.
Thanks, -Mathew
On Windows 7, there are APIs that will allow you to enumerate all the audio sessions on the machine, you can use these to enumerate the processes which are currently (or have recently) played audio.
There are some serious caveats to this. For instance you can't discover applications using 3rd party audio stacks like ASIO and you can't detect applications rendering compressed audio (using exclusive mode). But for a significant (98%?) of the apps, you can use the IAudioSessionManager2 interface to retreive a session enumerator which will let you enumerate the apps which are rendering (or have rendered recently) audio in shared mode.
Unfortunately this functionality is Windows 7 only.
You don't need process explorer.
Just enumerate the handle table from ring3 (old FAQ, Google groups, Win32)