pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/SDL2
Module Name: pkgsrc
Committed By: nia
Date: Thu Apr 16 04:12:39 UTC 2020
Modified Files:
pkgsrc/devel/SDL2: Makefile
pkgsrc/devel/SDL2/patches: patch-src_audio_netbsd_SDL__netbsdaudio.c
Log Message:
SDL2: Fix build on NetBSD 8
To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 pkgsrc/devel/SDL2/Makefile
cvs rdiff -u -r1.5 -r1.6 \
pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/SDL2/Makefile
diff -u pkgsrc/devel/SDL2/Makefile:1.49 pkgsrc/devel/SDL2/Makefile:1.50
--- pkgsrc/devel/SDL2/Makefile:1.49 Wed Apr 8 14:41:33 2020
+++ pkgsrc/devel/SDL2/Makefile Thu Apr 16 04:12:39 2020
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.49 2020/04/08 14:41:33 nia Exp $
+# $NetBSD: Makefile,v 1.50 2020/04/16 04:12:39 nia Exp $
DISTNAME= SDL2-2.0.12
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= devel
MASTER_SITES= https://www.libsdl.org/release/
Index: pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c
diff -u pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c:1.5 pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c:1.6
--- pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c:1.5 Wed Apr 8 14:41:33 2020
+++ pkgsrc/devel/SDL2/patches/patch-src_audio_netbsd_SDL__netbsdaudio.c Thu Apr 16 04:12:39 2020
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_audio_netbsd_SDL__netbsdaudio.c,v 1.5 2020/04/08 14:41:33 nia Exp $
+$NetBSD: patch-src_audio_netbsd_SDL__netbsdaudio.c,v 1.6 2020/04/16 04:12:39 nia Exp $
Use the preferred hardware sample rate
https://bugzilla.libsdl.org/show_bug.cgi?id=5080
@@ -17,15 +17,19 @@ https://bugzilla.libsdl.org/show_bug.cgi
struct audio_prinfo *prinfo = iscapture ? &info.record : &info.play;
/* We don't care what the devname is...we'll try to open anything. */
-@@ -232,8 +232,16 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
+@@ -232,8 +232,20 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
}
AUDIO_INITINFO(&info);
+ AUDIO_INITINFO(&hwinfo);
+
++#ifdef AUDIO_GETFORMAT
+ if (ioctl(this->hidden->audio_fd, AUDIO_GETFORMAT, &hwinfo) == -1) {
+ return SDL_SetError("Couldn't get device format %s: %s", devname, strerror(errno));
+ }
++#else
++ hwinfo.record.sample_rate = hwinfo.play.sample_rate = 48000;
++#endif
prinfo->encoding = AUDIO_ENCODING_NONE;
+ prinfo->channels = this->spec.channels;
@@ -34,7 +38,7 @@ https://bugzilla.libsdl.org/show_bug.cgi
for (format = SDL_FirstAudioFormat(this->spec.format); format;) {
switch (format) {
-@@ -261,6 +269,14 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
+@@ -261,6 +273,14 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
prinfo->encoding = AUDIO_ENCODING_ULINEAR_BE;
prinfo->precision = 16;
break;
@@ -49,7 +53,7 @@ https://bugzilla.libsdl.org/show_bug.cgi
}
if (prinfo->encoding != AUDIO_ENCODING_NONE) {
break;
-@@ -274,21 +290,18 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
+@@ -274,21 +294,18 @@ NETBSDAUDIO_OpenDevice(_THIS, void *hand
this->spec.format = format;
Home |
Main Index |
Thread Index |
Old Index