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 DllStSoundInterface
27 virtual ~DllStSoundInterface() {}
28 virtual void* LoadYM(const char* szFileName)=0;
29 virtual void FreeYM(void* ym)=0;
30 virtual int FillBuffer(void* ym, char* buffer, unsigned long length)=0;
31 virtual unsigned long Seek(void* ym, unsigned long iTimePos)=0;
32 virtual const char* GetTitle(void* ym)=0;
33 virtual const char* GetArtist(void* ym)=0;
34 virtual unsigned long GetLength(void* ym)=0;
37 class DllStSound : public DllDynamic, DllStSoundInterface
39 DECLARE_DLL_WRAPPER(DllStSound, DLL_PATH_YM_CODEC)
40 DEFINE_METHOD1(void*, LoadYM, (const char* p1))
41 DEFINE_METHOD1(void, FreeYM, (void* p1))
42 DEFINE_METHOD3(int, FillBuffer, (void* p1, char* p2, unsigned long p3))
43 DEFINE_METHOD2(unsigned long, Seek, (void* p1, unsigned long p2))
44 DEFINE_METHOD1(const char*, GetTitle, (void* p1))
45 DEFINE_METHOD1(const char*, GetArtist, (void* p1))
46 DEFINE_METHOD1(unsigned long, GetLength, (void* p1))
47 BEGIN_METHOD_RESOLVE()
48 RESOLVE_METHOD_RENAME(DLL_LoadYM, LoadYM)
49 RESOLVE_METHOD_RENAME(DLL_FreeYM, FreeYM)
50 RESOLVE_METHOD_RENAME(DLL_FillBuffer, FillBuffer)
51 RESOLVE_METHOD_RENAME(DLL_Seek, Seek)
52 RESOLVE_METHOD_RENAME(DLL_GetTitle, GetTitle)
53 RESOLVE_METHOD_RENAME(DLL_GetArtist, GetArtist)
54 RESOLVE_METHOD_RENAME(DLL_GetLength, GetLength)