| Summary: | Audio broken in latest snapshot | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sam Lantinga <slouken> |
| Component: | audio | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | kevlarman |
| Version: | HG 1.2 | ||
| Hardware: | Other | ||
| OS: | Linux | ||
|
Description
Sam Lantinga
2009-10-16 13:29:32 UTC
the same thing happens just running loopwave with the alsa driver. uncommenting #define SET_PERIOD_SIZE in SDL_alsa_audio.c seems to fix it. Can you post the version of ALSA you're using, along with the card that you have? Also, can you post the output with DEBUG_PERIOD_SIZE enabled with and without SET_PERIOD_SIZE enabled? Thanks! $ pacman -Si alsa-lib|grep Version Version : 1.0.21.a-1 without SET_PERIOD_SIZE defined: ALSA: period size = 470, periods = 0, buffer size = 3763 with it: ALSA: period size = 470, periods = 2, buffer size = 1411 it's a little more difficult to tell the difference with loopwave, but it's pretty blatant with (for example) firing plasma gun in ioq3 with the background music of q3dm6 (running ioq3 without SET_PERIOD_SIZE results in: ALSA: period size = 470, periods = 1, buffer size = 940 and with: ALSA: period size = 470, periods = 2, buffer size = 1411) $ uname -a Linux IfYouCanReadThisYoureTooClose 2.6.30-ARCH #1 SMP PREEMPT Wed Sep 9 14:16:44 CEST 2009 x86_64 Intel(R) Core(TM)2 Duo CPU E7400 @ 2.80GHz GenuineIntel GNU/Linux $ lspci |grep Audio 00:1b.0 Audio device: Intel Corporation 82801JI (ICH10 Family) HD Audio Controller 01:00.1 Audio device: ATI Technologies Inc R700 Audio Device [Radeon HD 4000 Series] (the second card is for hdmi output, and isn't actually used) It looks like your audio driver is broken or really oddly configured. You should never have 0 periods, and generally the buffer size should be a multiple of the period size. I'm going to go ahead and leave it setting the buffer size by default, since that seems to work as well or better for most people. However, I added an environment variable SDL_AUDIO_ALSA_SET_PERIOD_SIZE to get the old behavior for people who need it. Thanks! |