mirror of
https://git.code.sf.net/p/quake/quake2forge
synced 2024-12-12 13:42:21 +00:00
- Changed -lpthread to -pthread in quake2_LDFLAGS. Should
probably be a configure test - Added configure test for AFMT_S16_NE (FreeBSD doesn't have _NE, only _LE or _BE) - Wrapped the use of AFMT_S16_NE in ifdef HAVE_AFMT_S16_NE
This commit is contained in:
parent
740faf6966
commit
404101bc00
3 changed files with 28 additions and 2 deletions
17
configure.in
17
configure.in
|
@ -81,6 +81,23 @@ AC_TRY_LINK(
|
|||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
if test "x$ac_cv_header_sys_soundcard_h" = "xyes"; then
|
||||
AC_MSG_CHECKING(for AFMT_S16_NE in sys/soundcard.h)
|
||||
AC_EGREP_CPP([QF_maGiC_VALUE],
|
||||
[
|
||||
#include <sys/soundcard.h>
|
||||
#ifdef AFMT_S16_NE
|
||||
QF_maGiC_VALUE
|
||||
#endif
|
||||
],
|
||||
HAVE_AFMT_S16_NE=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
,
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
fi
|
||||
AC_SUBST(HAVE_AFMT_S16_NE)
|
||||
|
||||
dnl -----------------------------
|
||||
dnl Checks for library functions.
|
||||
dnl -----------------------------
|
||||
|
|
|
@ -107,7 +107,7 @@ ref_softsdl_so_SOURCES = $(REF_SOFT_COMMON) $(REF_SOFT_ASM) rw_sdl.c
|
|||
|
||||
AM_CFLAGS = -Wall -Werror -pipe -I/usr/X11R6/include $(shell sdl-config --cflags) -DOPENGL -fPIC
|
||||
|
||||
quake2_LDFLAGS = -lm -lpthread @DL_LIBS@
|
||||
quake2_LDFLAGS = -lm -pthread @DL_LIBS@
|
||||
|
||||
ref_glx_so_LDFLAGS = -shared
|
||||
ref_glx_so_LDADD = -L/usr/X11R6/lib -lX11 -lXext -lXxf86dga -lXxf86vm -lGL
|
||||
|
|
11
src/snd.c
11
src/snd.c
|
@ -292,7 +292,12 @@ qboolean SNDDMA_Init(void) {
|
|||
dma.samplebits = (int)sndbits->value;
|
||||
if (dma.samplebits != 16 && dma.samplebits != 8) {
|
||||
ioctl(audio_fd, SNDCTL_DSP_GETFMTS, &fmt);
|
||||
if (fmt & AFMT_S16_NE) dma.samplebits = 16;
|
||||
#ifdef HAVE_AFMT_S16_NE
|
||||
if (fmt & AFMT_S16_NE)
|
||||
#else
|
||||
if (fmt & AFMT_S16_LE)
|
||||
#endif
|
||||
dma.samplebits = 16;
|
||||
else if (fmt & AFMT_U8) dma.samplebits = 8;
|
||||
}
|
||||
/* in relnev 0.9, from here until the next RELNEV 0.9 comment has been moved
|
||||
|
@ -348,7 +353,11 @@ qboolean SNDDMA_Init(void) {
|
|||
|
||||
if (dma.samplebits == 16)
|
||||
{
|
||||
#ifdef HAVE_AFMT_S16_NE
|
||||
rc = AFMT_S16_NE;
|
||||
#else
|
||||
rc = AFMT_S16_LE;
|
||||
#endif
|
||||
rc = ioctl(audio_fd, SNDCTL_DSP_SETFMT, &rc);
|
||||
if (rc < 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue