[droid] Do not show any ui if pre-checks are OK
[vuplus_xbmc] / lib / DllAdpcm.h
1 #pragma once
2
3 /*
4  *      Copyright (C) 2005-2008 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 DllADPCMInterface
27 {
28 public:
29     virtual ~DllADPCMInterface() {}
30     virtual void* LoadXWAV(const char* szFileName)=0;
31     virtual void FreeXWAV(void*)=0;
32     virtual long FillBuffer(void* nsf, char* buffer, int size)=0;
33     virtual int GetPlaybackRate(void* nsf)=0;
34     virtual int GetNumberOfChannels(void* info)=0;
35     virtual int GetSampleSize(void* info)=0;
36     virtual int GetLength(void* info)=0;
37     virtual int Seek(void* info, int pos)=0;
38 };
39
40 class DllADPCM : public DllDynamic, DllADPCMInterface
41 {
42   DECLARE_DLL_WRAPPER(DllADPCM, DLL_PATH_ADPCM_CODEC)
43   DEFINE_METHOD1(void*, LoadXWAV, (const char* p1))
44   DEFINE_METHOD1(void, FreeXWAV, (void* p1))
45   DEFINE_METHOD3(long, FillBuffer, (void* p1, char* p2, int p3))
46   DEFINE_METHOD1(int, GetPlaybackRate, (void* p1))
47   DEFINE_METHOD1(int, GetNumberOfChannels, (void* p1))
48   DEFINE_METHOD1(int, GetSampleSize, (void* p1))
49   DEFINE_METHOD1(int, GetLength, (void* p1))
50   DEFINE_METHOD2(int, Seek, (void* p1, int p2))
51
52   BEGIN_METHOD_RESOLVE()
53     RESOLVE_METHOD_RENAME(DLL_LoadXWAV, LoadXWAV)
54     RESOLVE_METHOD_RENAME(DLL_FreeXWAV, FreeXWAV)
55     RESOLVE_METHOD_RENAME(DLL_FillBuffer, FillBuffer)
56     RESOLVE_METHOD_RENAME(DLL_GetPlaybackRate, GetPlaybackRate)
57     RESOLVE_METHOD_RENAME(DLL_Seek, Seek)
58     RESOLVE_METHOD_RENAME(DLL_GetNumberOfChannels, GetNumberOfChannels)
59     RESOLVE_METHOD_RENAME(DLL_GetSampleSize, GetSampleSize)
60     RESOLVE_METHOD_RENAME(DLL_GetLength, GetLength)
61   END_METHOD_RESOLVE()
62 };