Skip to content

Commit

Permalink
[addons] add addon audio engine callbacks on new way
Browse files Browse the repository at this point in the history
This add the currently with libKODI_audioengine.h done part to the
new style.

Due to missing addons who use them was a complete test currently not
possible and must be check in future, from the base is the work
equal to the old.

The old parts becomes in next commit removed.
  • Loading branch information
AlwinEsch committed May 28, 2017
1 parent 2897b5e commit 8bca4a3
Show file tree
Hide file tree
Showing 9 changed files with 1,199 additions and 6 deletions.
7 changes: 7 additions & 0 deletions addons/kodi.binary.global.audioengine/addon.xml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon id="kodi.binary.global.audioengine" version="@ADDON_GLOBAL_VERSION_AUDIOENGINE@" provider-name="Team Kodi">
<backwards-compatibility abi="@ADDON_GLOBAL_VERSION_AUDIOENGINE_MIN@"/>
<requires>
<import addon="xbmc.core" version="0.1.0"/>
</requires>
</addon>
1 change: 1 addition & 0 deletions system/addon-manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<addon>audioencoder.xbmc.builtin.aac</addon>
<addon>audioencoder.xbmc.builtin.wma</addon>
<addon>game.controller.default</addon>
<addon>kodi.binary.global.audioengine</addon>
<addon>kodi.binary.global.main</addon>
<addon>kodi.binary.global.gui</addon>
<addon>kodi.binary.instance.adsp</addon>
Expand Down
8 changes: 8 additions & 0 deletions xbmc/addons/AddonDll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
#include "utils/Variant.h"
#include "Util.h"

// Global addon callback handle classes
#include "addons/interfaces/AudioEngine.h"

namespace ADDON
{

Expand Down Expand Up @@ -559,11 +562,16 @@ bool CAddonDll::InitInterface(KODI_HANDLE firstKodiInstance)
// compatible with other versions and everything with "0"
// Related parts becomes set from addon headers.
m_interface.toAddon = (KodiToAddonFuncTable_Addon*) calloc(1, sizeof(KodiToAddonFuncTable_Addon));

Interface_AudioEngine::Init(&m_interface);

return true;
}

void CAddonDll::DeInitInterface()
{
Interface_AudioEngine::DeInit(&m_interface);

if (m_interface.libBasePath)
free((char*)m_interface.libBasePath);
if (m_interface.toKodi)
Expand Down
Loading

0 comments on commit 8bca4a3

Please sign in to comment.