diff options
author | 2023-09-21 20:25:50 -0400 | |
---|---|---|
committer | 2023-09-22 16:42:47 +0100 | |
commit | 371ef91dcf5a57d241fa130c3c9bdf9b17768b31 (patch) | |
tree | 41747d7d002b5d7dcfe9da03c07bf40a2ad06808 /media-plugins/calf/files | |
parent | media-plugins/calf: Remove usage of std::bind2nd (diff) | |
download | gentoo-371ef91dcf5a57d241fa130c3c9bdf9b17768b31.tar.gz gentoo-371ef91dcf5a57d241fa130c3c9bdf9b17768b31.tar.bz2 gentoo-371ef91dcf5a57d241fa130c3c9bdf9b17768b31.zip |
media-plugins/calf: Backport clang fix
Upstream: https://github.com/calf-studio-gear/calf/commit/bfb857445e72230659493d3491970e3cb3c7eb9a
Closes: https://bugs.gentoo.org/831023
Signed-off-by: Violet Purcell <vimproved@inventati.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-plugins/calf/files')
-rw-r--r-- | media-plugins/calf/files/calf-0.90.3-clang-lerp_table_lookup_float_mask.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/media-plugins/calf/files/calf-0.90.3-clang-lerp_table_lookup_float_mask.patch b/media-plugins/calf/files/calf-0.90.3-clang-lerp_table_lookup_float_mask.patch new file mode 100644 index 000000000000..d868fb8e1f33 --- /dev/null +++ b/media-plugins/calf/files/calf-0.90.3-clang-lerp_table_lookup_float_mask.patch @@ -0,0 +1,45 @@ +From bfb857445e72230659493d3491970e3cb3c7eb9a Mon Sep 17 00:00:00 2001 +From: Krzysztof Foltman <wdev@foltman.com> +Date: Fri, 2 Aug 2019 20:55:50 +0100 +Subject: [PATCH] Compatibility: A possible fix for the clang++-8 issue. + +--- + src/calf/fixed_point.h | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/calf/fixed_point.h b/src/calf/fixed_point.h +index 7dbf5c9bc..63bfce167 100644 +--- a/src/calf/fixed_point.h ++++ b/src/calf/fixed_point.h +@@ -215,7 +215,7 @@ template<class T, int FracBits> class fixed_point { + } + + template<class U, int UseBits> +- inline U lerp_table_lookup_int(U data[(1U<<IntBits)+1]) const { ++ inline U lerp_table_lookup_int(U *data) const { + unsigned int pos = uipart(); + return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]); + } +@@ -223,19 +223,19 @@ template<class T, int FracBits> class fixed_point { + /// Untested... I've started it to get a sin/cos readout for rotaryorgan, but decided to use table-less solution instead + /// Do not assume it works, because it most probably doesn't + template<class U, int UseBits> +- inline U lerp_table_lookup_int_shift(U data[(1U<<IntBits)+1], unsigned int shift) { ++ inline U lerp_table_lookup_int_shift(U *data, unsigned int shift) { + unsigned int pos = (uipart() + shift) & ((1ULL << IntBits) - 1); + return lerp_by_fract_int<U, UseBits>(data[pos], data[pos+1]); + } + + template<class U> +- inline U lerp_table_lookup_float(U data[(1U<<IntBits)+1]) const { ++ inline U lerp_table_lookup_float(U *data) const { + unsigned int pos = uipart(); + return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double(); + } + + template<class U> +- inline U lerp_table_lookup_float_mask(U data[(1U<<IntBits)+1], unsigned int mask) const { ++ inline U lerp_table_lookup_float_mask(U *data, unsigned int mask) const { + unsigned int pos = ui64part() & mask; + // printf("full = %lld pos = %d + %f\n", value, pos, fpart_as_double()); + return data[pos] + (data[pos+1]-data[pos]) * fpart_as_double(); |