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