From nobody Mon Nov 01 14:34:22 2021 X-Original-To: dev-commits-ports-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4AE8E182FA32; Mon, 1 Nov 2021 14:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HjbC25jn4z3tLv; Mon, 1 Nov 2021 14:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8150213708; Mon, 1 Nov 2021 14:34:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1A1EYM5u022132; Mon, 1 Nov 2021 14:34:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1A1EYMBl022131; Mon, 1 Nov 2021 14:34:22 GMT (envelope-from git) Date: Mon, 1 Nov 2021 14:34:22 GMT Message-Id: <202111011434.1A1EYMBl022131@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Thomas Zander Subject: git: d2826bd49998 - 2021Q4 - audio/openal-soft: Include the last patch for upstream sndio backend. List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: riggs X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q4 X-Git-Reftype: branch X-Git-Commit: d2826bd49998da2256a61737dc7e8c00aa45b146 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch 2021Q4 has been updated by riggs: URL: https://cgit.FreeBSD.org/ports/commit/?id=d2826bd49998da2256a61737dc7e8c00aa45b146 commit d2826bd49998da2256a61737dc7e8c00aa45b146 Author: Thomas Zander AuthorDate: 2021-11-01 14:16:36 +0000 Commit: Thomas Zander CommitDate: 2021-11-01 14:32:25 +0000 audio/openal-soft: Include the last patch for upstream sndio backend. Details: - Backport the remaining sndio backend commit at: https://github.com/kcat/openal-soft/commit/2df78e49b1359e7603e3816270737c68cccd5b05 Reported by: Brad Smith MFH: 2021Q4 (cherry picked from commit 520be1663a38864dc78882d186d423ba900a46ad) --- audio/openal-soft/Makefile | 2 +- .../openal-soft/files/patch-alc_backends_sndio.cpp | 22 +++++++--------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/audio/openal-soft/Makefile b/audio/openal-soft/Makefile index 69987e4d8ffa..f780656de5ef 100644 --- a/audio/openal-soft/Makefile +++ b/audio/openal-soft/Makefile @@ -1,6 +1,6 @@ PORTNAME= openal-soft PORTVERSION= 1.21.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= audio MASTER_SITES= https://openal-soft.org/openal-releases/ diff --git a/audio/openal-soft/files/patch-alc_backends_sndio.cpp b/audio/openal-soft/files/patch-alc_backends_sndio.cpp index dba1079c4249..ca168aebdff5 100644 --- a/audio/openal-soft/files/patch-alc_backends_sndio.cpp +++ b/audio/openal-soft/files/patch-alc_backends_sndio.cpp @@ -251,26 +251,18 @@ struct SndioCapture final : public BackendBase { SndioCapture(ALCdevice *device) noexcept : BackendBase{device} { } ~SndioCapture() override; -@@ -301,6 +283,7 @@ struct SndioCapture final : public BackendBase { - - sio_hdl *mSndHandle{nullptr}; - -+ al::vector mFds; - RingBufferPtr mRing; - - std::atomic mKillNow{true}; -@@ -323,40 +306,65 @@ int SndioCapture::recordProc() +@@ -323,40 +305,65 @@ int SndioCapture::recordProc() const uint frameSize{mDevice->frameSizeFromFmt()}; + int nfds_pre{sio_nfds(mSndHandle)}; -+ if (nfds_pre <= 0) ++ if(nfds_pre <= 0) + { + mDevice->handleDisconnect("Incorrect return value from sio_nfds(): %d", nfds_pre); + return 1; + } + -+ mFds.resize(nfds_pre); ++ auto fds = std::make_unique(static_cast(nfds_pre)); + while(!mKillNow.load(std::memory_order_acquire) && mDevice->Connected.load(std::memory_order_acquire)) @@ -279,7 +271,7 @@ - size_t todo{data.first.len + data.second.len}; - if(todo == 0) + /* Wait until there's some samples to read. */ -+ const int nfds{sio_pollfd(mSndHandle, mFds.data(), POLLIN)}; ++ const int nfds{sio_pollfd(mSndHandle, fds.get(), POLLIN)}; + if(nfds <= 0) { - static char junk[4096]; @@ -288,7 +280,7 @@ + mDevice->handleDisconnect("Failed to get polling fds: %d", nfds); + break; + } -+ int pollres{::poll(mFds.data(), static_cast(nfds), 2000)}; ++ int pollres{::poll(fds.get(), static_cast(nfds), 2000)}; + if(pollres < 0) + { + if(errno == EINTR) continue; @@ -298,7 +290,7 @@ + if(pollres == 0) continue; + -+ const int revents{sio_revents(mSndHandle, mFds.data())}; ++ const int revents{sio_revents(mSndHandle, fds.get())}; + if((revents&POLLHUP)) + { + mDevice->handleDisconnect("Got POLLHUP from poll events"); @@ -347,7 +339,7 @@ } return 0; -@@ -371,76 +379,80 @@ void SndioCapture::open(const char *name) +@@ -371,76 +378,80 @@ void SndioCapture::open(const char *name) throw al::backend_exception{al::backend_error::NoDevice, "Device name \"%s\" not found", name};