From 2774a39695b82e7b7ca9979fedba63ab0fd2ab89 Mon Sep 17 00:00:00 2001 From: Good Guy Date: Sat, 6 Dec 2025 11:40:49 -0700 Subject: [PATCH] Credit Rob/Andrew - found error bitshift of a negative value and patchfix for forced build of audiofile --- cinelerra-5.1/audiofile-0.3.6.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 cinelerra-5.1/audiofile-0.3.6.patch diff --git a/cinelerra-5.1/audiofile-0.3.6.patch b/cinelerra-5.1/audiofile-0.3.6.patch new file mode 100644 index 00000000..40c2a5d8 --- /dev/null +++ b/cinelerra-5.1/audiofile-0.3.6.patch @@ -0,0 +1,14 @@ +diff --git a/libaudiofile/modules/SimpleModule.h b/libaudiofile/modules/SimpleModule.h +index 03c6c69..bad85ad 100644 +--- a/libaudiofile/modules/SimpleModule.h ++++ b/libaudiofile/modules/SimpleModule.h +@@ -123,7 +123,8 @@ struct signConverter + typedef typename IntTypes::UnsignedType UnsignedType; + + static const int kScaleBits = (Format + 1) * CHAR_BIT - 1; +- static const int kMinSignedValue = -1 << kScaleBits; ++ static const int kMaxSignedValue = (((1 << (kScaleBits - 1)) - 1) << 1) + 1; ++ static const int kMinSignedValue = -kMaxSignedValue - 1; + + struct signedToUnsigned : public std::unary_function + { -- 2.34.1