diff -Nru kodi-audiodecoder-gme-2.0.0/appveyor.yml kodi-audiodecoder-gme-2.0.1/appveyor.yml
--- kodi-audiodecoder-gme-2.0.0/appveyor.yml 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/appveyor.yml 2013-05-31 22:59:22.000000000 +0000
@@ -23,7 +23,7 @@
build_script:
- cd ..
- - git clone --depth=1 https://github.com/xbmc/xbmc.git
+ - git clone --branch Leia --depth=1 https://github.com/xbmc/xbmc.git
- cd %app_id%
- mkdir build
- cd build
diff -Nru kodi-audiodecoder-gme-2.0.0/audiodecoder.gme/addon.xml.in kodi-audiodecoder-gme-2.0.1/audiodecoder.gme/addon.xml.in
--- kodi-audiodecoder-gme-2.0.0/audiodecoder.gme/addon.xml.in 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/audiodecoder.gme/addon.xml.in 2013-05-31 22:59:22.000000000 +0000
@@ -1,20 +1,32 @@
@ADDON_DEPENDS@
Game Music Emu Audio Decoder
- Game Music Emu Audio Decoder
+ Game Music Emu (GME) format is used to emulate the audio output of various video game consoles popular in the 1980s and 1990s. It gives a "retro" feel to the sound.
+
+Suppoted Formats:
+- AY: ZX Spectrum/Amstrad CPC
+- GBS: Nintendo Game Boy
+- GYM: Sega Genesis/Mega Drive
+- HES: NEC TurboGrafx-16/PC Engine
+- KSS: MSX Home Computer/other Z80 systems (no FM sound)
+- NSF/NSFE: Nintendo NES/Famicom (with VRC 6, Namco 106, and FME-7 sound)
+- SAP: Atari systems using POKEY sound chip
+- SPC: Super Nintendo/Super Famicom
+- VGM/VGZ: Sega Master System/Mark III, Sega Genesis/Mega Drive,BBC Micro
+
@PLATFORM@
diff -Nru kodi-audiodecoder-gme-2.0.0/CMakeLists.txt kodi-audiodecoder-gme-2.0.1/CMakeLists.txt
--- kodi-audiodecoder-gme-2.0.0/CMakeLists.txt 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/CMakeLists.txt 2013-05-31 22:59:22.000000000 +0000
@@ -1,11 +1,8 @@
+cmake_minimum_required(VERSION 3.5)
project(audiodecoder.gme)
-cmake_minimum_required(VERSION 2.6)
-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR})
-enable_language(CXX)
-
find_package(Kodi REQUIRED)
include_directories(${KODI_INCLUDE_DIR}/..
diff -Nru kodi-audiodecoder-gme-2.0.0/debian/changelog kodi-audiodecoder-gme-2.0.1/debian/changelog
--- kodi-audiodecoder-gme-2.0.0/debian/changelog 2018-11-06 11:17:09.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/debian/changelog 2013-05-31 22:59:22.000000000 +0000
@@ -1,4 +1,4 @@
-kodi-audiodecoder-gme (2.0.0-1~xenial) xenial; urgency=low
+kodi-audiodecoder-gme (2.0.1-1~xenial) xenial; urgency=low
[ kodi ]
* autogenerated dummy changelog
diff -Nru kodi-audiodecoder-gme-2.0.0/debian/control kodi-audiodecoder-gme-2.0.1/debian/control
--- kodi-audiodecoder-gme-2.0.0/debian/control 2018-11-06 11:14:56.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/debian/control 2013-05-31 22:59:22.000000000 +0000
@@ -1,8 +1,7 @@
Source: kodi-audiodecoder-gme
Priority: extra
Maintainer: Arne Morten Kvarving
-Build-Depends: debhelper (>= 8.0.0), cmake, kodi-addon-dev,
- libkodiplatform-dev (>= 17.1.0)
+Build-Depends: debhelper (>= 8.0.0), cmake, kodi-addon-dev
Standards-Version: 3.9.6
Section: libs
diff -Nru kodi-audiodecoder-gme-2.0.0/Jenkinsfile kodi-audiodecoder-gme-2.0.1/Jenkinsfile
--- kodi-audiodecoder-gme-2.0.0/Jenkinsfile 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/Jenkinsfile 2013-05-31 22:59:22.000000000 +0000
@@ -1 +1 @@
-buildPlugin()
+buildPlugin(version: "Leia")
diff -Nru kodi-audiodecoder-gme-2.0.0/lib/File_Extractor/CMakeLists.txt kodi-audiodecoder-gme-2.0.1/lib/File_Extractor/CMakeLists.txt
--- kodi-audiodecoder-gme-2.0.0/lib/File_Extractor/CMakeLists.txt 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/lib/File_Extractor/CMakeLists.txt 2013-05-31 22:59:22.000000000 +0000
@@ -1,10 +1,6 @@
+cmake_minimum_required(VERSION 3.5)
project(fileex)
-enable_language(C)
-enable_language(CXX)
-
-cmake_minimum_required(VERSION 2.6)
-
set (SOURCES fex/fex.cpp
fex/blargg_common.cpp
fex/File_Extractor.cpp
@@ -14,7 +10,5 @@
include_directories(${PROJECT_SOURCE_DIR})
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
-
add_library(fileex STATIC ${SOURCES})
+set_property(TARGET fileex PROPERTY POSITION_INDEPENDENT_CODE ON)
diff -Nru kodi-audiodecoder-gme-2.0.0/lib/File_Extractor/fex/Data_Reader.cpp kodi-audiodecoder-gme-2.0.1/lib/File_Extractor/fex/Data_Reader.cpp
--- kodi-audiodecoder-gme-2.0.0/lib/File_Extractor/fex/Data_Reader.cpp 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/lib/File_Extractor/fex/Data_Reader.cpp 2013-05-31 22:59:22.000000000 +0000
@@ -499,7 +499,23 @@
return wpath;
}
-#ifdef _WIN32
+#if defined(BUILD_KODI_ADDON)
+static inline FILE* blargg_fopen(const char path[], const char mode[])
+{
+ if (!path)
+ return nullptr;
+
+ kodi::vfs::CFile* file = new kodi::vfs::CFile;
+ if (!file->OpenFile(path, 0))
+ {
+ delete file;
+ return nullptr;
+ }
+
+ return (FILE*)file;
+}
+
+#elif defined(_WIN32)
static FILE* blargg_fopen( const char path [], const char mode [] )
{
@@ -524,18 +540,6 @@
return file;
}
-#elif defined(BUILD_KODI_ADDON)
-static inline FILE* blargg_fopen(const char path [], const char mode [])
-{
- kodi::vfs::CFile* file = new kodi::vfs::CFile;
- if (!file->OpenFile(path, 0))
- {
- delete file;
- return nullptr;
- }
- return (FILE*)file;
-}
-
#else
static inline FILE* blargg_fopen( const char path [], const char mode [] )
@@ -553,11 +557,15 @@
static int blargg_fread(void* p, int size, int num, void* file)
{
+ if (!file)
+ return -1;
return static_cast(file)->Read(p, size*num);
}
static int blargg_feof(void* f)
{
+ if (!f)
+ return -1;
kodi::vfs::CFile* file = static_cast(f);
return file->GetPosition() == file->GetLength();
}
@@ -632,8 +640,8 @@
blargg_err_t Std_File_Reader::open( const char path [] )
{
close();
-
- FILE* f;
+
+ FILE* f = nullptr;
RETURN_ERR( blargg_fopen( &f, path ) );
long s;
diff -Nru kodi-audiodecoder-gme-2.0.0/lib/Game_Music_Emu/CMakeLists.txt kodi-audiodecoder-gme-2.0.1/lib/Game_Music_Emu/CMakeLists.txt
--- kodi-audiodecoder-gme-2.0.0/lib/Game_Music_Emu/CMakeLists.txt 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/lib/Game_Music_Emu/CMakeLists.txt 2013-05-31 22:59:22.000000000 +0000
@@ -1,10 +1,6 @@
+cmake_minimum_required(VERSION 3.5)
project(gme)
-enable_language(C)
-enable_language(CXX)
-
-cmake_minimum_required(VERSION 2.6)
-
set(SOURCES gme/Ay_Apu.cpp
gme/Ay_Core.cpp
gme/Ay_Cpu.cpp
@@ -128,9 +124,7 @@
add_definitions(-DHAVE_STDINT_H)
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -fPIC")
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
-
include_directories(../File_Extractor/fex)
add_library(gme STATIC ${SOURCES})
+set_property(TARGET gme PROPERTY POSITION_INDEPENDENT_CODE ON)
diff -Nru kodi-audiodecoder-gme-2.0.0/README.md kodi-audiodecoder-gme-2.0.1/README.md
--- kodi-audiodecoder-gme-2.0.0/README.md 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/README.md 2013-05-31 22:59:22.000000000 +0000
@@ -16,7 +16,7 @@
The following instructions assume you will have built Kodi already in the `kodi-build` directory
suggested by the README.
-1. `git clone https://github.com/xbmc/xbmc.git`
+1. `git clone --branch Leia https://github.com/xbmc/xbmc.git`
2. `git clone https://github.com/xbmc/audiodecoder.gme.git`
3. `cd audiodecoder.gme && mkdir build && cd build`
4. `cmake -DADDONS_TO_BUILD=audiodecoder.gme -DADDON_SRC_PREFIX=../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../../xbmc/kodi-build/addons -DPACKAGE_ZIP=1 ../../xbmc/cmake/addons`
diff -Nru kodi-audiodecoder-gme-2.0.0/src/GMECodec.cpp kodi-audiodecoder-gme-2.0.1/src/GMECodec.cpp
--- kodi-audiodecoder-gme-2.0.0/src/GMECodec.cpp 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/src/GMECodec.cpp 2013-05-31 22:59:22.000000000 +0000
@@ -41,11 +41,11 @@
gme_delete(ctx.gme);
}
- virtual bool Init(const std::string& filename, unsigned int filecache,
- int& channels, int& samplerate,
- int& bitspersample, int64_t& totaltime,
- int& bitrate, AEDataFormat& format,
- std::vector& channellist) override
+ bool Init(const std::string& filename, unsigned int filecache,
+ int& channels, int& samplerate,
+ int& bitspersample, int64_t& totaltime,
+ int& bitrate, AEDataFormat& format,
+ std::vector& channellist) override
{
int track=0;
std::string toLoad(filename);
@@ -81,7 +81,7 @@
return true;
}
- virtual int ReadPCM(uint8_t* buffer, int size, int& actualsize) override
+ int ReadPCM(uint8_t* buffer, int size, int& actualsize) override
{
if (gme_tell(ctx.gme) >= ctx.len)
return -1;
@@ -90,14 +90,14 @@
return 0;
}
- virtual int64_t Seek(int64_t time) override
+ int64_t Seek(int64_t time) override
{
gme_seek(ctx.gme, time);
return gme_tell(ctx.gme);
}
- virtual bool ReadTag(const std::string& filename, std::string& title,
- std::string& artist, int& length) override
+ bool ReadTag(const std::string& filename, std::string& title,
+ std::string& artist, int& length) override
{
gme_t* gme=nullptr;
gme_open_file(filename.c_str(), &gme, 48000);
@@ -115,7 +115,7 @@
return true;
}
- virtual int TrackCount(const std::string& fileName) override
+ int TrackCount(const std::string& fileName) override
{
gme_t* gme=nullptr;
gme_open_file(fileName.c_str(), &gme, 48000);
@@ -136,15 +136,13 @@
class ATTRIBUTE_HIDDEN CMyAddon : public kodi::addon::CAddonBase
{
public:
- CMyAddon() { }
- virtual ADDON_STATUS CreateInstance(int instanceType, std::string instanceID, KODI_HANDLE instance, KODI_HANDLE& addonInstance) override
+ CMyAddon() = default;
+ ADDON_STATUS CreateInstance(int instanceType, std::string instanceID, KODI_HANDLE instance, KODI_HANDLE& addonInstance) override
{
addonInstance = new CGMECodec(instance);
return ADDON_STATUS_OK;
}
- virtual ~CMyAddon()
- {
- }
+ virtual ~CMyAddon() = default;
};
diff -Nru kodi-audiodecoder-gme-2.0.0/.travis.yml kodi-audiodecoder-gme-2.0.1/.travis.yml
--- kodi-audiodecoder-gme-2.0.0/.travis.yml 2018-11-05 13:23:13.000000000 +0000
+++ kodi-audiodecoder-gme-2.0.1/.travis.yml 2013-05-31 22:59:22.000000000 +0000
@@ -39,7 +39,7 @@
#
before_script:
- cd $TRAVIS_BUILD_DIR/..
- - git clone --depth=1 https://github.com/xbmc/xbmc.git
+ - git clone --branch Leia --depth=1 https://github.com/xbmc/xbmc.git
- cd ${app_id} && mkdir build && cd build
- mkdir -p definition/${app_id}
- echo ${app_id} $TRAVIS_BUILD_DIR $TRAVIS_COMMIT > definition/${app_id}/${app_id}.txt