Is the sound card in use?

I'm just wondering if there's a simple way (that could be used in a shell script) to tell if the sound card is in use (as in audio is being played)?