SDL_mixer sound lag in 64-bit Linux (but not in 32-bit) |
SDL_mixer sound lag in 64-bit Linux (but not in 32-bit) |
David Olofson
Guest
|
On Saturday 21 January 2006 22:14, Gerry JJ wrote:
[...]
Well, if you have some spare sound card around... Then again, if "everything else" works, that probably won't make a difference. However, I think SDL uses memory mapped audio whenever it can. Have you tried running Q3A, RTCW, Doom 3 or something else that does that too? Q3A and RTCW support only OSS, but Doom 3 supports ALSA natively. (Which means I only get sound in Doom 3 ATM. Can't be arsed to install the ALSA emulation, and the user space OSS emulation thing that Gentoo provides doesn't work properly with Q3A and RTCW.)
Sound in 64 bit SDL Works Here(TM)... (SB Audigy, Gentoo/AMD64, ALSA, no OSS emulation.) //David Olofson - Programmer, Composer, Open Source Advocate .------- http://olofson.net - Games, SDL examples -------. | http://zeespace.net - 2.5D rendering engine | | http://audiality.org - Music/audio engine | | http://eel.olofson.net - Real time scripting | '-- http://www.reologica.se - Rheology instrumentation --' |
|||||||||||||||
|
SDL_mixer sound lag in 64-bit Linux (but not in 32-bit) |
Gerry JJ
Guest
|
On Sun, 22 Jan 2006 10:33:15 +0100, David Olofson <david at olofson.net>
wrote:
I do have a spare sound card, but it's a little buggy, so I'd rather not use it. I've also got limited space for PCI cards =(.
I've tried Doom 3, which works fine, but then again that's only available in 32-bit, and as I mentioned before 32-bit SDL also works fine. Are there any 64-bit games/apps that does this that I could try, or a way to turn off mmapped audio in SDL to test if that works ? Btw, I also tried the 64-bit exe of your DT-42 (which I love, btw), which also had this problem, so if there's an SDL-related problem, it's in SDL, not in SDL_mixer.
So I'm pretty much out of luck, then ? I'm guessing there isn't any audio- driver-specific code in SDL ? Any idea why 32-bit SDL would work but 64-bit SDL doesn't ? - Gerry |
|||||||||||||||||||||
|
SDL_mixer sound lag in 64-bit Linux (but not in 32-bit) |
Ryan C. Gordon
Guest
|
fwiw, my Audigy card was completely hosed (output was static) with the ALSA drivers in 2.6.12 in 64-bit mode, while the OSS emu10k1 driver was fine. I built the latest stable ALSA drivers from alsa-project.org, and the problems totally vanished. It's worth noting that even though ALSA is a part of the kernel now, it seems that they still do their development independently, and occasionally a kernel maintainer syncs up with their releases, so it might be worth trying that manual upgrade. Also, if you weren't previously using ALSA and now you are, the default values might be up way too high, and can be tweaked in ~/.asoundrc: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?50:mss:120:200509:apbjmjknnpdaibahndfg --ryan. |
|||||||||||||
|
SDL_mixer sound lag in 64-bit Linux (but not in 32-bit) |
Gerry JJ
Guest
|
On Sun, 22 Jan 2006 16:10:35 +0100, Ryan C. Gordon <icculus at icculus.org>
wrote:
Thanks. This box has been using ALSA exclusively since the install, but I guess the default values were way too high anyway. Simply adding period_size 1024 buffer_size 4096 to ~/.asoundrc or /etc/asound.conf didn't work, but I did some searching and found a working .asoundrc, here: http://forums.gentoo.org/viewtopic-t-409806.html#2938602 Using this reduces the lag *significantly*. A buffer size of 8192 was a bit high, though, so I tried 4096 and then 2048, which is perfect for me, without any noticable lag or skipping. Thanks to everyone for your help! (Btw, because I'm curious, I'd still like to know why this was only a problem with SDL in 64-bit mode, if anyone has any thoughts about that) - Gerry |
|||||||||||||
|