Merge pull request #4324 from FernetMenta/wasapi
[vuplus_xbmc] / lib / DllVGMStream.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 DllVGMInterface
25 {
26 public:
27     virtual ~DllVGMInterface() {}
28     virtual long Init()=0;
29     virtual long LoadVGM(const char* szFileName, int* sampleRate, int* samleSize, int* channels)=0;
30     virtual void FreeVGM(long vgm)=0;
31     virtual int FillBuffer(long vgm, char* buffer, int length)=0;
32     virtual unsigned long Seek(long vgm, unsigned long iTimePos)=0;
33     virtual unsigned long GetLength(long vgm)=0;
34 };
35
36 class DllVGM : public DllDynamic, DllVGMInterface
37 {
38   DECLARE_DLL_WRAPPER(DllVGM, DLL_PATH_VGM_CODEC)
39   DEFINE_METHOD0(long, Init)
40   DEFINE_METHOD4(long, LoadVGM, (const char* p1, int* p2, int* p3, int* p4 ))
41   DEFINE_METHOD1(void, FreeVGM, (long p1))
42   DEFINE_METHOD3(int, FillBuffer, (long p1, char* p2, int p3))
43   DEFINE_METHOD2(unsigned long, Seek, (long p1, unsigned long p2))
44   DEFINE_METHOD1(unsigned long, GetLength, (long p1))
45   BEGIN_METHOD_RESOLVE()
46     RESOLVE_METHOD_RENAME(DLL_Init, Init)
47     RESOLVE_METHOD_RENAME(DLL_LoadVGM, LoadVGM)
48     RESOLVE_METHOD_RENAME(DLL_FreeVGM, FreeVGM)
49     RESOLVE_METHOD_RENAME(DLL_FillBuffer, FillBuffer)
50     RESOLVE_METHOD_RENAME(DLL_Seek, Seek)
51     RESOLVE_METHOD_RENAME(DLL_GetLength, GetLength)
52   END_METHOD_RESOLVE()
53 };
54