Received: by mail.netbsd.org (Postfix, from userid 605) id D31C284EBD; Thu, 16 Apr 2020 04:12:40 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 5CF7B84D59 for ; Thu, 16 Apr 2020 04:12:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id oVWwd-SkwSQZ for ; Thu, 16 Apr 2020 04:12:39 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id D11A284CEA for ; Thu, 16 Apr 2020 04:12:39 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id CAA5FFB27; Thu, 16 Apr 2020 04:12:39 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1587010359218040" MIME-Version: 1.0 Date: Thu, 16 Apr 2020 04:12:39 +0000 From: "Nia Alarie" Subject: CVS commit: pkgsrc/devel/SDL2 To: pkgsrc-changes@NetBSD.org Reply-To: nia@netbsd.org X-Mailer: log_accum Message-Id: <20200416041239.CAA5FFB27@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1587010359218040 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_1587010359218040 Content-Disposition: inline Content-Length: 2728 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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; --_----------=_1587010359218040--