aboutsummaryrefslogtreecommitdiff
path: root/libraries/libsidplay/files
diff options
context:
space:
mode:
authorIgor Alexandrov <igor.alexandrov@outlook.com>2020-12-26 16:05:13 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-12-26 16:05:13 +0700
commit6939dfa43775c5c3f28f2f39ded47178a156d55f (patch)
tree608dc579d4fd6b54477880294c626f2a6ad367e8 /libraries/libsidplay/files
parentb5ad2650466f4b9e06ddce423aece8930df35287 (diff)
libraries/libsidplay: Added (library for playing SID music files).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/libsidplay/files')
-rw-r--r--libraries/libsidplay/files/avoid_narrowing_conversion.patch20
-rw-r--r--libraries/libsidplay/files/remove_sid_have_ios_bin_block.patch38
2 files changed, 58 insertions, 0 deletions
diff --git a/libraries/libsidplay/files/avoid_narrowing_conversion.patch b/libraries/libsidplay/files/avoid_narrowing_conversion.patch
new file mode 100644
index 0000000000000..07480518c63c5
--- /dev/null
+++ b/libraries/libsidplay/files/avoid_narrowing_conversion.patch
@@ -0,0 +1,20 @@
+--- a/src/samples.cpp
++++ b/src/samples.cpp
+@@ -75,7 +75,7 @@ struct sampleChannel
+ sampleChannel ch4, ch5;
+
+
+-const sbyte galwayNoiseTab1[16] =
++const ubyte galwayNoiseTab1[16] =
+ {
+ 0x80,0x91,0xa2,0xb3,0xc4,0xd5,0xe6,0xf7,
+ 0x08,0x19,0x2a,0x3b,0x4c,0x5d,0x6e,0x7f
+@@ -84,7 +84,7 @@ const sbyte galwayNoiseTab1[16] =
+ ubyte galwayNoiseVolTab[16];
+ sbyte galwayNoiseSamTab[16];
+
+-const sbyte sampleConvertTab[16] =
++const ubyte sampleConvertTab[16] =
+ {
+ // 0x81,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff,
+ // 0x00,0x11,0x22,0x33,0x44,0x55,0x66,0x7f
diff --git a/libraries/libsidplay/files/remove_sid_have_ios_bin_block.patch b/libraries/libsidplay/files/remove_sid_have_ios_bin_block.patch
new file mode 100644
index 0000000000000..f1fcc41cca556
--- /dev/null
+++ b/libraries/libsidplay/files/remove_sid_have_ios_bin_block.patch
@@ -0,0 +1,38 @@
+--- a/src/sidtune.cpp
++++ b/src/sidtune.cpp
+@@ -306,11 +306,7 @@ udword sidTune::loadFile(const char* fileName, ubyte** bufferRef)
+ return 0;
+ }
+ // Open binary input file stream at end of file.
+-#if defined(SID_HAVE_IOS_BIN)
+- ifstream myIn( fileName, ios::in|ios::bin|ios::ate );
+-#else
+ ifstream myIn( fileName, ios::in|ios::binary|ios::ate );
+-#endif
+ // As a replacement for !is_open(), bad() and the NOT-operator
+ // don't seem to work on all systems.
+ #if defined(SID_DONT_HAVE_IS_OPEN)
+@@ -972,11 +968,7 @@ bool sidTune::saveC64dataFile( const char* fileName, bool overWriteFlag )
+ }
+ // Open binary output file stream.
+ else
+-#if defined(SID_HAVE_IOS_BIN)
+- fMyOut.open( fileName, ios::out|ios::bin|ios::trunc );
+-#else
+ fMyOut.open( fileName, ios::out|ios::binary|ios::trunc );
+-#endif
+ if ( !fMyOut )
+ {
+ info.statusString = text_cantCreateFile;
+@@ -1061,11 +1053,7 @@ bool sidTune::savePSIDfile( const char* fileName, bool overWriteFlag )
+ }
+ // Open binary output file stream.
+ else
+-#if defined(SID_HAVE_IOS_BIN)
+- fMyOut.open( fileName, ios::out|ios::bin|ios::trunc );
+-#else
+ fMyOut.open( fileName, ios::out|ios::binary|ios::trunc );
+-#endif
+ if ( !fMyOut )
+ {
+ info.statusString = text_cantCreateFile;