Credit Rob/Andrew - found error bitshift of a negative value and patchfix for forced... master
authorGood Guy <good1.2guy@gmail.com>
Sat, 6 Dec 2025 18:40:49 +0000 (11:40 -0700)
committerGood Guy <good1.2guy@gmail.com>
Sat, 6 Dec 2025 18:40:49 +0000 (11:40 -0700)
cinelerra-5.1/audiofile-0.3.6.patch [new file with mode: 0644]

diff --git a/cinelerra-5.1/audiofile-0.3.6.patch b/cinelerra-5.1/audiofile-0.3.6.patch
new file mode 100644 (file)
index 0000000..40c2a5d
--- /dev/null
@@ -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<Format>::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<SignedType, UnsignedType>
+       {