Using the quake2-icculus ebuild with the Obey USE=dedicated patch applied, it appears that the quake2 binary constantly buffer underruns with ALSA. This is not the case with the sdlquake2 binary. Reproducible: Always Steps to Reproduce: 1. emerge quake2-icculus 2. emerge quake2-data 3. 'quake2' at a terminal Portage 2.0.51.22-r3 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r2, 2.6.12-gentoo-r6 i686) ================================================================= System uname: 2.6.12-gentoo-r6 i686 AMD Duron(tm) processor Gentoo Base System version 1.6.13 dev-lang/python: 2.3.5, 2.4.2 sys-apps/sandbox: 1.2.11 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.15.92.0.2-r10 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow 3dnowext X aac alsa apm asm avi berkdb bitmap-fonts bmp bzip2 cdrom cpudetection crypt cups curl dvd dvdread eds emboss encode esd fam figlet firefox flac foomaticdb fortran gdbm gif gimp gkrellm glibc-omitfp gnome gphoto2 gpm gstreamer gtk gtk2 imlib ipv6 java jpeg kde kqemu libg++ libwww lm_sensors mad mikmod mime mmx mmxext mng motif mozsvg mp3 mpeg mplayer musepack music ncurses nls ntfs nvidia ogg oggvorbis opengl openssh openssl oss pam pdflib perl png python quicktime readline rogue ruby sdl spell sse ssl svg tcpd theora tiff truetype truetype-fonts type1-fonts udev unicode usb utf8 vfat vorbis wifi win32codecs xatrix xine xml2 xmms xpm xscreensaver xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY Hardware: AMD Duron MG Morgan 1.2GHz nVidia GeForce FX 5200 768MB DDR SDRAM [1x 256, 1x 512] Creative Labs SB Audigy LS Gigabyte K7 Triton [SiS748 chipset] D-Link AirPlus DWL-520+
I didn't try sdlquake2 but I have the same for quake2.
Same for me, and I got even a segfault if I don't use sdlquake.
Bug #137522 contains a warning in the ebuild patch. /usr/share/doc/quake2-icculus-0.16.1/README.gz does state that the ALSA support is not "100% there".
Created attachment 147746 [details, diff] patch to cure alsa buffer underruns You just uncomment something in src/linux/snd_alsa.c. It's already been there. Cures it for me on a recent stable x86 system.
umm, to be more exact, my patch works when you compile with alsa, but without sdl support, i.e. straight alsa. IIRC I put "+set snddevice /dev/audio" on the command line, but it should work without (alsa default.) ccing myself.
I applied your patch and I get a compile error. You sure there isn't anything else we should do in the source code ? src/linux/snd_alsa.c:163: error: 'buffer_size' undeclared (first use in this function) src/linux/snd_alsa.c:163: error: (Each undeclared identifier is reported only once src/linux/snd_alsa.c:163: error: for each function it appears in.) src/linux/snd_alsa.c:163: error: too few arguments to function 'snd_pcm_hw_params_get_buffer_size' src/linux/snd_alsa.c:164: error: 'frame_size' undeclared (first use in this function) src/linux/snd_alsa.c:177: error: invalid lvalue in assignment src/linux/snd_alsa.c:185: warning: pointer targets in assignment differ in signedness src/linux/snd_alsa.c:52: warning: unused variable 'framesize' src/linux/snd_alsa.c:51: warning: unused variable 'buffersize' make[1]: *** [releasei386/client/snd_alsa.o] Error 1 make[1]: Leaving directory `/var/tmp/portage/games-fps/quake2-icculus-0.16.1/work/quake2-r0.16.1' make: *** [build_release] Error 2
*** Bug 149750 has been marked as a duplicate of this bug. ***
punted alsa since it's incomplete.