My question is very similar to this one: Peak meters for individual programs on Windows 7
I'm also trying to write a program to enumerate all processes currently playing sound. But in my case I need it to work also on Windows XP, and the answer I found here doesn't work for me because WASAPI wasn't introduced until Windows Vista.