From 8c858f27ae715cea6d73a8908a0a5116893e260b Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Thu, 3 Jan 2019 20:24:30 +0000 Subject: [PATCH] Fix SIGBUS with 24 bit content over OSS output PR: 234574 Submitted by: dev@submerge.ch MFH: 2019Q1 --- audio/jack/Makefile | 3 ++- audio/jack/files/patch-libjack_port.c | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 audio/jack/files/patch-libjack_port.c diff --git a/audio/jack/Makefile b/audio/jack/Makefile index 0953ddd7fc04..b189d4d7d53e 100644 --- a/audio/jack/Makefile +++ b/audio/jack/Makefile @@ -3,7 +3,7 @@ PORTNAME= jackit PORTVERSION= 0.125.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= audio MAINTAINER= multimedia@FreeBSD.org @@ -21,6 +21,7 @@ LIB_DEPENDS= libsndfile.so:audio/libsndfile \ USES= autoreconf compiler:c11 gmake pathfix pkgconfig libtool localbase bdb USE_GITHUB= yes + GH_ACCOUNT= jackaudio GH_PROJECT= jack1 GH_TAGNAME= 90f9dd3 diff --git a/audio/jack/files/patch-libjack_port.c b/audio/jack/files/patch-libjack_port.c new file mode 100644 index 000000000000..67102b4c15b7 --- /dev/null +++ b/audio/jack/files/patch-libjack_port.c @@ -0,0 +1,26 @@ +--- libjack/port.c.orig 2019-01-02 01:51:31 UTC ++++ libjack/port.c +@@ -630,13 +630,22 @@ jack_port_get_buffer (jack_port_t *port, jack_nframes_ + size_t + jack_port_type_buffer_size (jack_port_type_info_t* port_type_info, jack_nframes_t nframes) + { ++ size_t size; ++ + if ( port_type_info->buffer_scale_factor < 0 ) { + return port_type_info->buffer_size; + } + +- return port_type_info->buffer_scale_factor ++ size = port_type_info->buffer_scale_factor + * sizeof(jack_default_audio_sample_t) + * nframes; ++ ++#ifdef USE_DYNSIMD ++ /* Round up to the next multiple of 16 bytes, align buffers for SIMD. */ ++ size = (size + 15) & (~ (size_t)0x0f); ++#endif /* USE_DYNSIMD */ ++ ++ return size; + } + + int