I would like to know if there is a programmatic way (public API, terminal command, AppleScript, etc.) to list all processes currently playing sound through the default sound output in Mac OS 10.6 ?
I already tried using the "lsof | grep -i coreaudio" terminal command to list processes having a handle on Core Audio, but this does not tell me if those processes are outputting sound currently; they might have outputted sound before or they intend to do it in the future.
For instance, if I open Google Chrome, at first it is not listed when I use the lsof command. Then, if I load a video on Youtube, it connects to Core Audio, so it gets listed. But, when I'm done with the video, even if I close the browser window completely, it still is listed as being connected to the driver even though it is obviously not playing sound anymore. It only stops being listed when I quit the process.
Note that while having a lengthy programming experience in C++ on Windows platforms and knowing the Windows API pretty well, I'm rather new to Mac OS programming, so please be understanding if I miss something obvious.
Thanks, François Charron
lsof | grep -i coreaudiowas what i needed - aeb0