My computer often produces a "ding" sound, and I can't associate it with anything. Is it possible to programmatically determine the source of the beeps? For example can I hook the sound driver? If so, can you point out some examples or references?
+1
A:
Omer, this isn't a programming question, despite your edit.
No programming is necessary. Close applications one by one over time until the ding stops.
Jeff Atwood
2008-12-04 17:51:51
I don't want to get into your fight, but since I write monitoring programs as part of my research, I would actually love to know of a programmatic way to know where sounds are coming from and also where sound input is routing to.
Uri
2008-12-05 01:47:08
A:
What operating system is this? If you're on Linux, you can use the lsof(8)
command to see what files every process has open. If a process is playing sound, it will have the sound device file open, so you can grep for it like so:
lsof | grep -E '/dev/(snd|dsp)'
Another option is to use fuser(1)
, which works similarly to lsof
.
Adam Rosenfield
2008-12-17 16:49:12