Sound card in use?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: George Toft
Date:  
Subject: Sound card in use?
Awesome - that worked.

It doesn't matter to me who is using it - I don't want to interefere
with the current sound with my "OMFG!!! The world is collapsing" alarm.

Thanks.

George



"der.hans" wrote:
>
> Am 19. Apr, 2002 schwätzte George Toft so:
>
> > 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?
>
> fuser /dev/dsp
>
> You could then walk those proc numbers to see if it's esd or the sound
> daemon that KDE is using and try to connect to that daemon.
>
> ciao,
>
> der.hans
> --
> # https://www.LuftHans.com/
> # Don't step in front of speeding cars, don't eat explosives
> # and don't use m$ LookOut :). - der.hans
>
> ________________________________________________
> See http://PLUG.phoenix.az.us/navigator-mail.shtml if your mail doesn't post to the list quickly and you use Netscape to write mail.
>
> PLUG-discuss mailing list -
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss