Topic: audio crash

I developed a widget that play a sound using action script class sound.
This is the code I use

var mSound=new Sound();
mSound.attachSound("PlayTest");

btnEmb.onRelease=function(){
    mSound.start(0,1);
}

I play this widget before any other sound. It works. After, I play radio (or any other sound using btplay)
and it doesn't work. It is necessary to restart both chaumbyflashplayer.x and btplayd.
When the sound doesn't work if I try to launch aplay I obtain this message;

ALSA lib pcm_direct.c:222:(make_local_socket) connect failed: /tmp/alsa-dmix-3811-1269252235-692413: No such file or directory
ALSA lib pcm_dmix.c:907:(snd_pcm_dmix_open) unable to connect client
aplay: main:544: audio open error: No such file or directory

After a while even action script sound class doesn't work and if I strace chumbyflashplayer.x I read

socket(PF_FILE, SOCK_STREAM, 0)         = 10
connect(10, {sa_family=AF_FILE, path="/tmp/alsa-dmix-3811-1269252235-692413"...}, 39) = -1 ENOENT (No such file or directory)
write(2, "ALSA lib pcm_direct.c:222:(make_l"..., 46ALSA lib pcm_direct.c:222:(make_local_socket) ) = 46
write(2, "connect failed: /tmp/alsa-dmix-38"..., 53connect failed: /tmp/alsa-dmix-3811-1269252235-692413) = 53
write(2, ": No such file or directory"..., 27: No such file or directory) = 27
write(2, "\n"..., 1
)                    = 1
close(10)                               = 0
write(2, "ALSA lib pcm_dmix.c:907:(snd_pcm_"..., 44ALSA lib pcm_dmix.c:907:(snd_pcm_dmix_open) ) = 44
write(2, "unable to connect client"..., 24unable to connect client) = 24
write(2, "\n"..., 1
)                    = 1
gettimeofday({1269255894, 959159}, NULL) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2652, ...}) = 0
stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2652, ...}) = 0
write(2, "2010-03-22 12:04:54 g_pcm_handle "..., 812010-03-22 12:04:54 g_pcm_handle == 0, cannot configure audio device plug:dmixer
) = 81

If I use btplay before sound class all works fine.

Btplayd seems to know nothing about this error, and if I read /tmp/.btplay-cmdout there is no error.

I tried this with more of one chumby.

Re: audio crash

This code looks bit chunky here. Can you tell me only the error message you are getting or  mail me the script so I can check it out and tell you the exact solution.