Do you have two sound/music software running at the same time?
One software might lock the sound card for it's use. Some applications accept to share resources other don't ...
ALSA is usually used in Linux to output. You can restart alsa by doing:
alsa-utils is a init.d startup script which brings alsa up when the OS boots.
If the sound system is working then it quits then most likely you have a software that's causing alsa to hang up.