From aaabf45ad5d748c4118cbb656b9b8299035fe801 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Wed, 12 Aug 2020 13:15:26 +0200 Subject: [PATCH 1/6] android build fix --- ...{0001-windows-fix.patch => 01-fix-windows.patch} | 0 .../common/wavpack/02-fix-android-arm-build.patch | 13 +++++++++++++ depends/common/wavpack/03-fix-android-arch64.patch | 10 ++++++++++ 3 files changed, 23 insertions(+) rename depends/common/wavpack/{0001-windows-fix.patch => 01-fix-windows.patch} (100%) create mode 100644 depends/common/wavpack/02-fix-android-arm-build.patch create mode 100644 depends/common/wavpack/03-fix-android-arch64.patch diff --git a/depends/common/wavpack/0001-windows-fix.patch b/depends/common/wavpack/01-fix-windows.patch similarity index 100% rename from depends/common/wavpack/0001-windows-fix.patch rename to depends/common/wavpack/01-fix-windows.patch diff --git a/depends/common/wavpack/02-fix-android-arm-build.patch b/depends/common/wavpack/02-fix-android-arm-build.patch new file mode 100644 index 0000000..85d7936 --- /dev/null +++ b/depends/common/wavpack/02-fix-android-arm-build.patch @@ -0,0 +1,13 @@ +index fbb5e75..5cd9fc0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -126,7 +126,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*") + endif() + elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i386.*|i486.*|i586.*|i686.*|i786.*") + set(CPU_ASM_X86 1) +-elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm*") ++elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm*" AND WIN32) # WIN32 as about Android ARM it fails + if(CMAKE_SIZEOF_VOID_P EQUAL 4) + set(CPU_ASM_ARM32 1) + endif() + diff --git a/depends/common/wavpack/03-fix-android-arch64.patch b/depends/common/wavpack/03-fix-android-arch64.patch new file mode 100644 index 0000000..efe7abc --- /dev/null +++ b/depends/common/wavpack/03-fix-android-arch64.patch @@ -0,0 +1,10 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -60,6 +60,7 @@ option(WAVPACK_ENABLE_DSD "Enable support for WavPack DSD files" ON) + option(WAVPACK_INSTALL_CMAKE_MODULE "Generate and install CMake package configuration module" ON) + option(WAVPACK_INSTALL_DOCS "Install documentation" ON) + option(WAVPACK_INSTALL_PKGCONFIG_MODULE "Generate and install wavpack.pc" ON) ++option(COMPILER_SUPPORTS_SYMBOL_MAPS "To set manually the support about" OFF) + + # Configuration tests + From 3faf2bb1b0a96a5c29529edea07de87bd3d2dcc8 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Mon, 14 Sep 2020 18:52:55 +0200 Subject: [PATCH 2/6] fix travis debian build and add ubuntu focal to build --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 30a1b24..2d7a674 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,11 @@ matrix: sudo: required compiler: gcc env: DEBIAN_BUILD=true + - os: linux + dist: focal + sudo: required + compiler: gcc + env: DEBIAN_BUILD=true - os: osx osx_image: xcode10.2 @@ -45,7 +50,7 @@ before_script: - if [[ $DEBIAN_BUILD != true ]]; then mkdir -p definition/${app_id}; fi - if [[ $DEBIAN_BUILD != true ]]; then echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt; fi - if [[ $DEBIAN_BUILD != true ]]; then cmake -DADDONS_TO_BUILD=${app_id} -DADDON_SRC_PREFIX=$TRAVIS_BUILD_DIR/.. -DADDONS_DEFINITION_DIR=$TRAVIS_BUILD_DIR/build/definition -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$TRAVIS_BUILD_DIR/../xbmc/addons -DPACKAGE_ZIP=1 $TRAVIS_BUILD_DIR/../xbmc/cmake/addons; fi - - if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/master/xbmc/addons/kodi-addon-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi + - if [[ $DEBIAN_BUILD == true ]]; then wget https://raw.githubusercontent.com/xbmc/xbmc/master/xbmc/addons/kodi-dev-kit/tools/debian-addon-package-test.sh && chmod +x ./debian-addon-package-test.sh; fi - if [[ $DEBIAN_BUILD == true ]]; then sudo apt-get build-dep $TRAVIS_BUILD_DIR; fi script: From 616cad410d3372a2e5a33d89943d97fad15f84e7 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Mon, 14 Sep 2020 19:05:05 +0200 Subject: [PATCH 3/6] remove unused functions and add helper to namespace --- src/sacd/sacd_core.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/sacd/sacd_core.cpp b/src/sacd/sacd_core.cpp index d5181dd..04efe90 100644 --- a/src/sacd/sacd_core.cpp +++ b/src/sacd/sacd_core.cpp @@ -17,9 +17,11 @@ #include -std::string getFileExt(const std::string& s) +namespace { +std::string getFileExt(const std::string& s) +{ size_t i = s.rfind('.', s.length()); if (i != std::string::npos) { @@ -29,17 +31,6 @@ std::string getFileExt(const std::string& s) return (""); } -void replaceExt(std::string& s, const std::string& newExt) -{ - - std::string::size_type i = s.rfind('.', s.length()); - - if (i != std::string::npos) - { - s.replace(i + 1, newExt.length(), newExt); - } -} - bool icasecmp(const std::string& l, const std::string& r) { return l.size() == r.size() && equal(l.cbegin(), l.cend(), r.cbegin(), @@ -48,6 +39,7 @@ bool icasecmp(const std::string& l, const std::string& r) }); } +} /* namespace */ bool sacd_core_t::g_is_our_content_type(const std::string& p_type) { From b8919dc08e6098fb124eb002eaa1ba47af36cd02 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Mon, 14 Sep 2020 21:55:44 +0200 Subject: [PATCH 4/6] fix setting lfe-adjust, was before wrongly as volume-lfe in code --- src/Settings.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Settings.cpp b/src/Settings.cpp index 03b08c7..f993a84 100644 --- a/src/Settings.cpp +++ b/src/Settings.cpp @@ -12,7 +12,7 @@ bool CSACDSettings::Load() { m_volumeAdjust = kodi::GetSettingFloat("volume-adjust", 0.0f); - m_lfeAdjust = pow(10.0f, kodi::GetSettingFloat("volume-lfe", 0.0f) / 20.0f); + m_lfeAdjust = pow(10.0f, kodi::GetSettingFloat("lfe-adjust", 0.0f) / 20.0f); m_samplerate = kodi::GetSettingInt("samplerate", 352800); m_dsd2pcmMode = kodi::GetSettingInt("dsd2pcm-mode", 0); m_dsd2pcmFirFile = kodi::GetSettingString("firconverter", ""); From 11f27408effa92a874e4731cd7ceaf2bba766090 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Tue, 15 Sep 2020 21:04:03 +0200 Subject: [PATCH 5/6] remove unused 'tracks="true"' from addon.xml --- audiodecoder.sacd/addon.xml.in | 1 - 1 file changed, 1 deletion(-) diff --git a/audiodecoder.sacd/addon.xml.in b/audiodecoder.sacd/addon.xml.in index 83ad369..eec75ad 100644 --- a/audiodecoder.sacd/addon.xml.in +++ b/audiodecoder.sacd/addon.xml.in @@ -9,7 +9,6 @@ point="kodi.audiodecoder" name="sacd" extension=".iso|.sacdstream" - tracks="true" tags="true" library_@PLATFORM@="@LIBRARY_FILENAME@"/> From e47e6a78fda5c71d3da49079287e2a7fcb867988 Mon Sep 17 00:00:00 2001 From: Alwin Esch Date: Wed, 16 Sep 2020 22:57:44 +0200 Subject: [PATCH 6/6] increase version to 0.1.1 --- audiodecoder.sacd/addon.xml.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/audiodecoder.sacd/addon.xml.in b/audiodecoder.sacd/addon.xml.in index eec75ad..8c7c1fd 100644 --- a/audiodecoder.sacd/addon.xml.in +++ b/audiodecoder.sacd/addon.xml.in @@ -1,7 +1,7 @@ @ADDON_DEPENDS@