Agnel Kurian
Agnel Kurian

Reputation: 59466

Detect Processes using Audio on Windows

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?

Upvotes: 5

Views: 6108

Answers (3)

novel
novel

Reputation:

You don't need process explorer.
Just enumerate the handle table from ring3 (old FAQ, Google groups, Win32)

Upvotes: 0

Larry Osterman
Larry Osterman

Reputation: 16142

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.

Upvotes: 5

Mathew
Mathew

Reputation: 317

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

Upvotes: 4

Related Questions