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