SDL mixer plays good sound only once after a reboot

I wrote a small SDL_mixer program, when I run it the first time, I get following message
"ALSA lib pcm_dmix.c:802:(snd_pcm_dmix_open) unable to open slave"

Obviously you’re on Linux.

But the program plays sound with good quality — that time only.

After that, when I run this program again, I dont get this message, but sound
quality is terrible.

Obviously you’re on Linux.

A similar thing happened to me:
I killed my sound daemon (esd), then I ran an Allegro program which managed to play sounds.
I loaded back esd but the sounds from my window manager didn’t come back.
I tried an SDL program and got the same message as above, and no sound at all.

It seems that at least two sound daemons/managers are caught in a food fight
for the “/dev/dsp” device.
Can’t help more.On Wed, 16 Nov 2005 20:06:17 +0000 (UTC), Laeeq_m_Khan <Laeeq_M_Khan at hotmail.com> wrote: