How to find out which application uses speakers?

Some application sending short beeps at random times after windows is returned from hibernate and sleep states. Is there any way to track down this program?

Update:

Problem solved by closing all programs. One of desktop widgets was responsible for the sound. I think there is nicer solution for this problem...


Solution 1:

Enter sndvol into the start menu or right-click on the volume icon in the notification area of the taskbar and hit Open Volume Mixer. When an application makes a sound you should be able to see it visually here.

As for the cause, that would be application dependent.