diff options
author | Alwin Esch <alwin.esch@web.de> | 2016-09-10 13:24:54 +0200 |
---|---|---|
committer | Alwin Esch <alwin.esch@web.de> | 2016-12-13 01:05:14 +0100 |
commit | 8aa3114eb064f72762b29db2591ebb4df1e62a9d (patch) | |
tree | b4c50e52ec5dee43bc2ae94a8193feb1dbc0762f /lib | |
parent | 5342ce9b02cabb61e4e51447f93a47e512c0e4bd (diff) |
[adsp] bye, bye libKODI_adsp.cpp
Diffstat (limited to 'lib')
5 files changed, 0 insertions, 308 deletions
diff --git a/lib/addons/library.kodi.adsp/CMakeLists.txt b/lib/addons/library.kodi.adsp/CMakeLists.txt deleted file mode 100644 index b3fc142a73..0000000000 --- a/lib/addons/library.kodi.adsp/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -project(KODI_adsp) -core_add_addon_library(${PROJECT_NAME}) diff --git a/lib/addons/library.kodi.adsp/Makefile.in b/lib/addons/library.kodi.adsp/Makefile.in deleted file mode 100644 index 77b880b7b7..0000000000 --- a/lib/addons/library.kodi.adsp/Makefile.in +++ /dev/null @@ -1,29 +0,0 @@ -ARCH=@ARCH@ -INCLUDES=-I. -I../../../xbmc/addons/kodi-addon-dev-kit/include/kodi -I../../../xbmc/addons/kodi-addon-dev-kit/include -I../../../xbmc -I../../../xbmc/cores/VideoPlayer/DVDDemuxers -DEFINES+= -CXXFLAGS=-fPIC -LIBNAME=libKODI_adsp -OBJS=$(LIBNAME).o - -ifeq ($(findstring osx,$(ARCH)), osx) -LIB_SHARED=../../../addons/library.kodi.adsp/$(LIBNAME)-$(ARCH).dylib -else -LIB_SHARED=../../../addons/library.kodi.adsp/$(LIBNAME)-$(ARCH).so -endif - -all: $(LIB_SHARED) - -$(LIB_SHARED): $(OBJS) -ifeq ($(findstring osx,$(ARCH)), osx) - $(CXX) $(CXXFLAGS) $(LDFLAGS) -dynamiclib -o $@ $(OBJS) -else - $(CXX) $(CFLAGS) $(LDFLAGS) -shared -g -o $(LIB_SHARED) $(OBJS) -endif - -CLEAN_FILES = \ - $(LIB_SHARED) \ - -DISTCLEAN_FILES= \ - Makefile \ - -include ../../../Makefile.include diff --git a/lib/addons/library.kodi.adsp/libKODI_adsp.cpp b/lib/addons/library.kodi.adsp/libKODI_adsp.cpp deleted file mode 100644 index e7cbd2ea81..0000000000 --- a/lib/addons/library.kodi.adsp/libKODI_adsp.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright (C) 2013-2014 Team KODI - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with KODI; see the file COPYING. If not, see - * <http://www.gnu.org/licenses/>. - * - */ - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string> -#include "addons/kodi-addon-dev-kit/include/kodi/libKODI_adsp.h" -#include "addons/binary/interfaces/api1/AudioDSP/AddonCallbacksAudioDSP.h" - -#ifdef _WIN32 -#include <windows.h> -#define DLLEXPORT __declspec(dllexport) -#else -#define DLLEXPORT -#endif - -using namespace std; -using namespace KodiAPI::V1::AudioDSP; - -extern "C" -{ - -DLLEXPORT void* ADSP_register_me(void *hdl) -{ - CB_ADSPLib *cb = NULL; - if (!hdl) - fprintf(stderr, "libKODI_adsp-ERROR: ADSPLib_register_me is called with NULL handle !!!\n"); - else - { - cb = (CB_ADSPLib*)((AddonCB*)hdl)->ADSPLib_RegisterMe(((AddonCB*)hdl)->addonData); - if (!cb) - fprintf(stderr, "libKODI_adsp-ERROR: ADSPLib_register_me can't get callback table from KODI !!!\n"); - } - return cb; -} - -DLLEXPORT void ADSP_unregister_me(void *hdl, void* cb) -{ - if (hdl && cb) - ((AddonCB*)hdl)->ADSPLib_UnRegisterMe(((AddonCB*)hdl)->addonData, (CB_ADSPLib*)cb); -} - -DLLEXPORT void ADSP_add_menu_hook(void *hdl, void* cb, AE_DSP_MENUHOOK *hook) -{ - if (cb == NULL) - return; - - ((CB_ADSPLib*)cb)->AddMenuHook(((AddonCB*)hdl)->addonData, hook); -} - -DLLEXPORT void ADSP_remove_menu_hook(void *hdl, void* cb, AE_DSP_MENUHOOK *hook) -{ - if (cb == NULL) - return; - - ((CB_ADSPLib*)cb)->RemoveMenuHook(((AddonCB*)hdl)->addonData, hook); -} - -DLLEXPORT void ADSP_register_mode(void *hdl, void* cb, AE_DSP_MODES::AE_DSP_MODE *mode) -{ - if (cb == NULL) - return; - - ((CB_ADSPLib*)cb)->RegisterMode(((AddonCB*)hdl)->addonData, mode); -} - -DLLEXPORT void ADSP_unregister_mode(void *hdl, void* cb, AE_DSP_MODES::AE_DSP_MODE *mode) -{ - if (cb == NULL) - return; - - ((CB_ADSPLib*)cb)->UnregisterMode(((AddonCB*)hdl)->addonData, mode); -} - -///------------------------------------- -/// CAddonSoundPlay - -DLLEXPORT CAddonSoundPlay* ADSP_get_sound_play(void *hdl, void *cb, const char *filename) -{ - return new CAddonSoundPlay(hdl, cb, filename); -} - -DLLEXPORT void ADSP_release_sound_play(CAddonSoundPlay* p) -{ - delete p; -} - -CAddonSoundPlay::CAddonSoundPlay(void *hdl, void *cb, const char *filename) - : m_Filename(filename), - m_Handle(hdl), - m_cb(cb) -{ - m_PlayHandle = NULL; - if (!hdl || !cb) - fprintf(stderr, "libKODI_adsp-ERROR: ADSP_get_sound_play is called with NULL handle !!!\n"); - else - { - m_PlayHandle = ((CB_ADSPLib*)m_cb)->SoundPlay_GetHandle(((AddonCB*)m_Handle)->addonData, m_Filename.c_str()); - if (!m_PlayHandle) - fprintf(stderr, "libKODI_adsp-ERROR: ADSP_get_sound_play can't get callback table from KODI !!!\n"); - } -} - -CAddonSoundPlay::~CAddonSoundPlay() -{ - if (m_PlayHandle) - ((CB_ADSPLib*)m_cb)->SoundPlay_ReleaseHandle(((AddonCB*)m_Handle)->addonData, m_PlayHandle); -} - -void CAddonSoundPlay::Play() -{ - if (m_PlayHandle) - ((CB_ADSPLib*)m_cb)->SoundPlay_Play(((AddonCB*)m_Handle)->addonData, m_PlayHandle); -} - -void CAddonSoundPlay::Stop() -{ - if (m_PlayHandle) - ((CB_ADSPLib*)m_cb)->SoundPlay_Stop(((AddonCB*)m_Handle)->addonData, m_PlayHandle); -} - -bool CAddonSoundPlay::IsPlaying() -{ - if (!m_PlayHandle) - return false; - - return ((CB_ADSPLib*)m_cb)->SoundPlay_IsPlaying(((AddonCB*)m_Handle)->addonData, m_PlayHandle); -} - -void CAddonSoundPlay::SetChannel(AE_DSP_CHANNEL channel) -{ - if (m_PlayHandle) - ((CB_ADSPLib*)m_cb)->SoundPlay_SetChannel(((AddonCB*)m_Handle)->addonData, m_PlayHandle, channel); -} - -AE_DSP_CHANNEL CAddonSoundPlay::GetChannel() -{ - if (!m_PlayHandle) - return AE_DSP_CH_INVALID; - return ((CB_ADSPLib*)m_cb)->SoundPlay_GetChannel(((AddonCB*)m_Handle)->addonData, m_PlayHandle); -} - -void CAddonSoundPlay::SetVolume(float volume) -{ - if (m_PlayHandle) - ((CB_ADSPLib*)m_cb)->SoundPlay_SetVolume(((AddonCB*)m_Handle)->addonData, m_PlayHandle, volume); -} - -float CAddonSoundPlay::GetVolume() -{ - if (!m_PlayHandle) - return 0.0f; - - return ((CB_ADSPLib*)m_cb)->SoundPlay_GetVolume(((AddonCB*)m_Handle)->addonData, m_PlayHandle); -} - -}; diff --git a/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj b/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj deleted file mode 100644 index 12e716d968..0000000000 --- a/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj +++ /dev/null @@ -1,84 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup Label="ProjectConfigurations"> - <ProjectConfiguration Include="Debug|Win32"> - <Configuration>Debug</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - <ProjectConfiguration Include="Release|Win32"> - <Configuration>Release</Configuration> - <Platform>Win32</Platform> - </ProjectConfiguration> - </ItemGroup> - <PropertyGroup Label="Globals"> - <ProjectGuid>{44F93C4D-85DD-4452-99BB-F1D196174024}</ProjectGuid> - <RootNamespace>KODI_ADSP</RootNamespace> - <Keyword>Win32Proj</Keyword> - <WindowsTargetPlatformVersion>10.0.10240.0</WindowsTargetPlatformVersion> - </PropertyGroup> - <Import Project="$(SolutionDir)\XBMC.core-defaults.props" /> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>false</UseDebugLibraries> - <CharacterSet>MultiByte</CharacterSet> - <PlatformToolset>v140</PlatformToolset> - </PropertyGroup> - <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> - <ConfigurationType>DynamicLibrary</ConfigurationType> - <UseDebugLibraries>true</UseDebugLibraries> - <PlatformToolset>v140</PlatformToolset> - </PropertyGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> - <ImportGroup Label="ExtensionSettings"> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets"> - <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> - </ImportGroup> - <ImportGroup Label="PropertySheets"> - <Import Project="$(SolutionDir)\XBMC.defaults.props" /> - </ImportGroup> - <PropertyGroup Label="UserMacros" /> - <PropertyGroup> - <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\..\addons\library.kodi.adsp\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Debug\</IntDir> - <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\..\addons\library.kodi.adsp\</OutDir> - <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Release\</IntDir> - <IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\..\..\addons\library.xbmc.addon\;$(IncludePath)</IncludePath> - <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\..\..\addons\library.xbmc.addon\;$(IncludePath)</IncludePath> - </PropertyGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> - <ClCompile> - <AdditionalIncludeDirectories>..\..\..\..\..\xbmc;..\..\..\..\..\xbmc\addons\kodi-addon-dev-kit\include\kodi;..\..\..\..\..\xbmc\cores\VideoPlayer\DVDDemuxers;..\..\..\..\..\addons\library.xbmc.addon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>VDR_EXPORTS;_WIN32PC;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <ExceptionHandling>Sync</ExceptionHandling> - <PrecompiledHeader> - </PrecompiledHeader> - </ClCompile> - <Link> - <OutputFile>..\..\..\..\..\addons\library.kodi.adsp\$(ProjectName).dll</OutputFile> - </Link> - </ItemDefinitionGroup> - <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> - <ClCompile> - <AdditionalIncludeDirectories>..\..\..\..\..\xbmc;..\..\..\..\..\xbmc\addons\kodi-addon-dev-kit\include\kodi;..\..\..\..\..\xbmc\cores\VideoPlayer\DVDDemuxers;..\..\..\..\..\addons\library.xbmc.addon;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>HAS_SDL_OPENGL;HAS_SDL;_USRDLL;XBMC_VDR_EXPORTS;_WIN32PC;%(PreprocessorDefinitions)</PreprocessorDefinitions> - <ExceptionHandling>Sync</ExceptionHandling> - <PrecompiledHeader> - </PrecompiledHeader> - </ClCompile> - <Link> - <OutputFile>..\..\..\..\..\addons\library.kodi.adsp\$(ProjectName).dll</OutputFile> - </Link> - </ItemDefinitionGroup> - <ItemGroup> - <ClCompile Include="..\..\libKODI_adsp.cpp" /> - </ItemGroup> - <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> - <ImportGroup Label="ExtensionTargets"> - </ImportGroup> -</Project>
\ No newline at end of file diff --git a/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj.filters b/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj.filters deleted file mode 100644 index 03be80f3ec..0000000000 --- a/lib/addons/library.kodi.adsp/project/VS2010Express/libKODI_adsp.vcxproj.filters +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <ItemGroup> - <Filter Include="Source Files"> - <UniqueIdentifier>{A463B136-5D8C-4995-A8D5-67FA2B90B6A8}</UniqueIdentifier> - <Extensions>cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> - </Filter> - <Filter Include="Header Files"> - <UniqueIdentifier>{EAFF7342-E9A9-4164-A40A-639A72C620DA}</UniqueIdentifier> - <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> - </Filter> - </ItemGroup> - <ItemGroup> - <ClCompile Include="..\..\libKODI_adsp.cpp"> - <Filter>Source Files</Filter> - </ClCompile> - </ItemGroup> -</Project> |