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