openbsd-ports/devel/sdl/patches/patch-configure
jakemsr 53ef50a03a cleanup sndio backend
- rename from "libsndio" to "sndio"
- remove support for "frame tick" synchronization; nothing uses it
- as with many other sndio backends, the audio device block size is the
  buffer-write-size the application wants and there are 2 blocks per
  device buffer
- if SDL will resample, increase the audio block and buffer size by
  the same ratio, so that device latency (or how much *time* the
  application has between write()s to not let the buffer underrun) does
  not change
- allow applications to disable conversions

tested with almost every port that uses this code (exceptions being some
games that require non-free game data) on a device most likely to be
affected by the changes (azalia(4) that only does 44.1 or 48 kHz s16)

unoverriding conversion disabling exposes brokenness in a few other
ports, those will be fixed soon
2009-01-24 10:56:11 +00:00

56 lines
1.4 KiB
Plaintext

$OpenBSD: patch-configure,v 1.20 2009/01/24 10:56:11 jakemsr Exp $
--- configure.orig Sun Dec 30 21:09:39 2007
+++ configure Mon Sep 22 20:13:46 2008
@@ -25411,6 +25411,20 @@ _ACEOF
fi
}
+
+CheckSndio()
+{
+ if [ x"$WITH_SNDIO" = x"Yes" ]; then
+
+ cat >>confdefs.h <<\_ACEOF
+#define SDL_AUDIO_DRIVER_SNDIO 1
+_ACEOF
+ SOURCES="$SOURCES $srcdir/src/audio/libsndio/*.c"
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lsndio"
+ fi
+}
+
+
CheckPulseAudio()
{
# Check whether --enable-pulseaudio was given.
@@ -26333,9 +26347,6 @@ echo "${ECHO_T}$CompileNASM_ret" >&6; }
win32)
NASMFLAGS="-f win32"
;;
- openbsd)
- NASMFLAGS="-f aoutb"
- ;;
macosx)
NASMFLAGS="-f macho"
;;
@@ -33577,6 +33588,7 @@ _ACEOF
CheckALSA
CheckARTSC
CheckESD
+ CheckSndio
CheckPulseAudio
CheckNAS
CheckX11
@@ -33612,10 +33624,10 @@ _ACEOF
;;
netbsd|openbsd)
cat >>confdefs.h <<\_ACEOF
-#define SDL_AUDIO_DRIVER_BSD 1
+#define SDL_AUDIO_DRIVER_SUNAUDIO 1
_ACEOF
- SOURCES="$SOURCES $srcdir/src/audio/bsd/*.c"
+ SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
have_audio=yes
;;
aix)