Merge pull request #4324 from FernetMenta/wasapi
[vuplus_xbmc] / lib / DllSidplay2.h
1 #pragma once
2 /*
3  *      Copyright (C) 2005-2013 Team XBMC
4  *      http://xbmc.org
5  *
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)
9  *  any later version.
10  *
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.
15  *
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/>.
19  *
20  */
21
22 #include "DynamicDll.h"
23
24 class DllSidplay2Interface
25 {
26 public:
27     virtual ~DllSidplay2Interface() {}
28     virtual int Init()=0;
29     virtual void* LoadSID(const char* szFileName)=0;
30     virtual void FreeSID(void* sid)=0;
31     virtual void StartPlayback(void* sid, int track)=0;
32     virtual int FillBuffer(void* sid, void* buffer, int length)=0;
33     virtual int GetNumberOfSongs(const char* szFileName)=0;
34     virtual void SetSpeed(void* sid, int speed)=0;
35 };
36
37 class DllSidplay2 : public DllDynamic, DllSidplay2Interface
38 {
39   DECLARE_DLL_WRAPPER(DllSidplay2, DLL_PATH_SID_CODEC)
40   DEFINE_METHOD0(int, Init)
41   DEFINE_METHOD1(void*, LoadSID, (const char* p1))
42   DEFINE_METHOD1(void, FreeSID, (void* p1))
43   DEFINE_METHOD2(void, StartPlayback,(void* p1, int p2))
44   DEFINE_METHOD3(int, FillBuffer, (void* p1, void* p2, int p3))
45   DEFINE_METHOD1(int, GetNumberOfSongs, (const char* p1))
46   DEFINE_METHOD2(void, SetSpeed, (void* p1, int p2))
47   BEGIN_METHOD_RESOLVE()
48     RESOLVE_METHOD_RENAME(DLL_Init, Init)
49     RESOLVE_METHOD_RENAME(DLL_LoadSID, LoadSID)
50     RESOLVE_METHOD_RENAME(DLL_FreeSID, FreeSID)
51     RESOLVE_METHOD_RENAME(DLL_StartPlayback,StartPlayback)
52     RESOLVE_METHOD_RENAME(DLL_FillBuffer, FillBuffer)
53     RESOLVE_METHOD_RENAME(DLL_GetNumberOfSongs, GetNumberOfSongs)
54     RESOLVE_METHOD_RENAME(DLL_SetSpeed, SetSpeed)
55   END_METHOD_RESOLVE()
56 };
57