Sound card in use?

Etusivu
Liitteet:
Viesti alkuperäisessä muodossaan
+ (text/plain)
Poista viesti
Vastaa
Lähettäjä: George Toft
Päiväys:  
Aihe: Sound card in use?
How can I tell if an application is using the sound card? I'm writing
a script that needs to play a sound, but only if the sound card is not
currently being used. What I'm doing right now is:

    IN_USE=`lsof | grep dsp`


Which works, but I know lsof can impose a performance hit. Any ideas?

George