diff options
Diffstat (limited to 'xbmc/addons/include/xbmc_vis_dll.h')
| -rw-r--r-- | xbmc/addons/include/xbmc_vis_dll.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/xbmc/addons/include/xbmc_vis_dll.h b/xbmc/addons/include/xbmc_vis_dll.h new file mode 100644 index 0000000..c65f844 --- /dev/null +++ b/xbmc/addons/include/xbmc_vis_dll.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | #ifndef __XBMC_VIS_H__ | ||
| 2 | #define __XBMC_VIS_H__ | ||
| 3 | |||
| 4 | /* | ||
| 5 | * Copyright (C) 2005-2013 Team XBMC | ||
| 6 | * http://xbmc.org | ||
| 7 | * | ||
| 8 | * This Program is free software; you can redistribute it and/or modify | ||
| 9 | * it under the terms of the GNU General Public License as published by | ||
| 10 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 11 | * any later version. | ||
| 12 | * | ||
| 13 | * This Program is distributed in the hope that it will be useful, | ||
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | * GNU General Public License for more details. | ||
| 17 | * | ||
| 18 | * You should have received a copy of the GNU General Public License | ||
| 19 | * along with XBMC; see the file COPYING. If not, see | ||
| 20 | * <http://www.gnu.org/licenses/>. | ||
| 21 | * | ||
| 22 | */ | ||
| 23 | |||
| 24 | #include "xbmc_addon_dll.h" | ||
| 25 | #include "xbmc_vis_types.h" | ||
| 26 | |||
| 27 | extern "C" | ||
| 28 | { | ||
| 29 | // Functions that your visualisation must implement | ||
| 30 | void Start(int iChannels, int iSamplesPerSec, int iBitsPerSample, const char* szSongName); | ||
| 31 | void AudioData(const float* pAudioData, int iAudioDataLength, float *pFreqData, int iFreqDataLength); | ||
| 32 | void Render(); | ||
| 33 | bool OnAction(long action, const void *param); | ||
| 34 | void GetInfo(VIS_INFO* pInfo); | ||
| 35 | unsigned int GetPresets(char ***presets); | ||
| 36 | unsigned GetPreset(); | ||
| 37 | unsigned int GetSubModules(char ***presets); | ||
| 38 | bool IsLocked(); | ||
| 39 | |||
| 40 | // function to export the above structure to XBMC | ||
| 41 | void __declspec(dllexport) get_addon(struct Visualisation* pVisz) | ||
| 42 | { | ||
| 43 | pVisz->Start = Start; | ||
| 44 | pVisz->AudioData = AudioData; | ||
| 45 | pVisz->Render = Render; | ||
| 46 | pVisz->OnAction = OnAction; | ||
| 47 | pVisz->GetInfo = GetInfo; | ||
| 48 | pVisz->GetPresets = GetPresets; | ||
| 49 | pVisz->GetPreset = GetPreset; | ||
| 50 | pVisz->GetSubModules = GetSubModules; | ||
| 51 | pVisz->IsLocked = IsLocked; | ||
| 52 | }; | ||
| 53 | }; | ||
| 54 | |||
| 55 | #endif | ||
