View Full Version : Some sound lag problems
Ricapar
July 13th, 2005, 01:27 PM
When I open some games, I will often get this message:
ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave
The sound will still work, but it will be behind what is going on by about 2-3 seconds.
In alsamixergui, it said this for my sound card:Card: VIA 82C686A/B rev50
Chip: Cirrus Logic CS4299 rev 4
Any one have any ideas what is causing this and/or how to fix it?
BigCdaAnswer3
July 13th, 2005, 03:03 PM
When I open some games, I will often get this message:
ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave
The sound will still work, but it will be behind what is going on by about 2-3 seconds.
In alsamixergui, it said this for my sound card:Card: VIA 82C686A/B rev50
Chip: Cirrus Logic CS4299 rev 4
Any one have any ideas what is causing this and/or how to fix it?
trying doing a:
pkill esd
see if that helps
Ricapar
July 13th, 2005, 03:24 PM
Nope =(
I've tried "killall esd", "pkill esd", no luck. When I do "killall esd", it says: "esd: no process killed".
varunus
July 13th, 2005, 04:07 PM
Can you post your ~/.asoundrc or your /etc/asound.conf (whichever one you have)? Delay problems can usually be fixed by tweaking these files.
Ricapar
July 14th, 2005, 12:53 AM
/etc/asound.conf:
pcm.card0 {
type hw
card 0
}
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1025
slave {
pcm "hw:0,0"
period_time 0
period_size 2048
buffer_size 32768
rate 48000
}
bindings {
0 0
1 1
}
}
varunus
July 14th, 2005, 01:04 AM
Reduce period_size to 1024 and buffer_size to 4096. Then type "sudo /etc/init.d/alsa restart" in a console. This will reduce the delay, but may make scratchy sound. If your sound is scratchy, slowly raise each value and restart alsa again until you find the right balance. I'm using an onboard intel 8x0 card (not exactly the best sound card) and those values produce perfect sound with no delays.
Good luck.
Ricapar
July 14th, 2005, 12:22 PM
I did that, sound didn't become scratchy, but the delay and that little message was still there.
varunus
July 14th, 2005, 04:22 PM
Hmm...do you only have lag in games? Which games are those? Do they happen to use OSS? If so, there's something you could try adding to your asound.conf...
Add this to the end:
pcm.dsp0 {
type plug
slave.pcm "dmixer"
}
and then restart ALSA.
Does that work?
Ricapar
July 15th, 2005, 01:06 AM
Going to give that a try. The games I've gotten those thigns with was Quake2, ZSNES(any rom), and a few others I can't remember off the top of my head =(
update: Nope, same message, same lag ](*,)
varunus
July 15th, 2005, 01:04 PM
Hm...I did a little searching, and read on the ZSNES forums that it uses SDL for audio output. (I'm not sure about quake.) Do you have the ALSA version of SDL installed? Check synaptic...If you don't it might be trying to play through ESD, which can have lag.
Ricapar
July 18th, 2005, 03:08 PM
Hm...I did a little searching, and read on the ZSNES forums that it uses SDL for audio output. (I'm not sure about quake.) Do you have the ALSA version of SDL installed? Check synaptic...If you don't it might be trying to play through ESD, which can have lag.
I searched through Synaptic. Searched for ALSA, and didn't find any packages that related to SDL. Searched for SDL, and didn't find any packages that related to ALSA.
varunus
July 19th, 2005, 11:37 AM
Really? I have libsdl1.2debian-alsa listed in synaptic. Do you have universe enabled in your repositories?
Ricapar
July 24th, 2005, 02:40 PM
Strange. That one didn't show up when I searched for alsa and sdl, but it's there. Anyways, I installed it, it said that it would remove "libsdl1.2debian-all". I let it, and went to try quake2. It worked. Went to try ZSNES, and there was no sound at all. It would give me "Sound init failed" right after the error mentioned on the first post of this topic. I went back to try Quake2, and I got the same thing with a slightly wording, but still no sound. I tried again, this time it worked, but with the lag back. Went back to ZSNES, no sound.
I reinstalled libsdl1.2debian-all, sound in ZSNES and Quake2 was back, but with the same lag.
This is driving me crazy >_<
Ricapar
August 1st, 2005, 08:30 PM
I also noticed that it only happens somtimes. For example, with ZSNES: I'll open it and get that error, I close it, open it again, get the error. if I repeat enough times, it will open without the error.
Any ideas?
Nihilist
August 2nd, 2005, 12:08 PM
im on xandros 2.0 currently.
but are you using a binary for zsnes? you can get it from zophar.net and other places, and ive never ran into trouble with it that way.
vBulletin® v3.8.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.