3 * Copyright (C) 2005-2013 Team XBMC
6 * This Program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
11 * This Program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with XBMC; see the file COPYING. If not, see
18 * <http://www.gnu.org/licenses/>.
22 #include "DynamicDll.h"
24 class DllADPCMInterface
27 virtual ~DllADPCMInterface() {}
28 virtual void* LoadXWAV(const char* szFileName)=0;
29 virtual void FreeXWAV(void*)=0;
30 virtual long FillBuffer(void* nsf, char* buffer, int size)=0;
31 virtual int GetPlaybackRate(void* nsf)=0;
32 virtual int GetNumberOfChannels(void* info)=0;
33 virtual int GetSampleSize(void* info)=0;
34 virtual int GetLength(void* info)=0;
35 virtual int Seek(void* info, int pos)=0;
38 class DllADPCM : public DllDynamic, DllADPCMInterface
40 DECLARE_DLL_WRAPPER(DllADPCM, DLL_PATH_ADPCM_CODEC)
41 DEFINE_METHOD1(void*, LoadXWAV, (const char* p1))
42 DEFINE_METHOD1(void, FreeXWAV, (void* p1))
43 DEFINE_METHOD3(long, FillBuffer, (void* p1, char* p2, int p3))
44 DEFINE_METHOD1(int, GetPlaybackRate, (void* p1))
45 DEFINE_METHOD1(int, GetNumberOfChannels, (void* p1))
46 DEFINE_METHOD1(int, GetSampleSize, (void* p1))
47 DEFINE_METHOD1(int, GetLength, (void* p1))
48 DEFINE_METHOD2(int, Seek, (void* p1, int p2))
50 BEGIN_METHOD_RESOLVE()
51 RESOLVE_METHOD_RENAME(DLL_LoadXWAV, LoadXWAV)
52 RESOLVE_METHOD_RENAME(DLL_FreeXWAV, FreeXWAV)
53 RESOLVE_METHOD_RENAME(DLL_FillBuffer, FillBuffer)
54 RESOLVE_METHOD_RENAME(DLL_GetPlaybackRate, GetPlaybackRate)
55 RESOLVE_METHOD_RENAME(DLL_Seek, Seek)
56 RESOLVE_METHOD_RENAME(DLL_GetNumberOfChannels, GetNumberOfChannels)
57 RESOLVE_METHOD_RENAME(DLL_GetSampleSize, GetSampleSize)
58 RESOLVE_METHOD_RENAME(DLL_GetLength, GetLength)