PageRenderTime 25ms CodeModel.GetById 14ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/xbmc/cores/paplayer/SPCCodec.h

http://github.com/xbmc/xbmc
C++ Header | 70 lines | 44 code | 7 blank | 19 comment | 0 complexity | 2e420e793f6c1c7c7ba17a8ff54633b5 MD5 | raw file
 1#ifndef SPC_CODEC_H_
 2#define SPC_CODEC_H_
 3
 4/*
 5 *      Copyright (C) 2005-2013 Team XBMC
 6 *      http://xbmc.org
 7 *
 8 *  This Program is free software; you can redistribute it and/or modify
 9 *  it under the terms of the GNU General Public License as published by
10 *  the Free Software Foundation; either version 2, or (at your option)
11 *  any later version.
12 *
13 *  This Program is distributed in the hope that it will be useful,
14 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 *  GNU General Public License for more details.
17 *
18 *  You should have received a copy of the GNU General Public License
19 *  along with XBMC; see the file COPYING.  If not, see
20 *  <http://www.gnu.org/licenses/>.
21 *
22 */
23
24#include "ICodec.h"
25#include "snesapu/Types.h"
26#include "../DllLoader/LibraryLoader.h"
27
28class SPCCodec : public ICodec
29{
30public:
31  SPCCodec();
32  virtual ~SPCCodec();
33
34  virtual bool Init(const CStdString &strFile, unsigned int filecache);
35  virtual void DeInit();
36  virtual int64_t Seek(int64_t iSeekTime);
37  virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize);
38  virtual bool CanInit();
39private:
40#ifdef TARGET_POSIX
41  typedef void  (__cdecl *LoadMethod) ( const void* p1);
42  typedef void* (__cdecl *EmuMethod) ( void *p1, u32 p2, u32 p3);
43  typedef void  (__cdecl *SeekMethod) ( u32 p1, b8 p2 );
44  typedef u32 (__cdecl *InitMethod)(void);
45  typedef void (__cdecl *DeInitMethod)(void);
46#else
47  typedef void  (__stdcall* LoadMethod) ( const void* p1);
48  typedef void* (__stdcall * EmuMethod) ( void *p1, u32 p2, u32 p3);
49  typedef void  (__stdcall * SeekMethod) ( u32 p1, b8 p2 );
50#endif
51  struct
52  {
53    LoadMethod LoadSPCFile;
54    EmuMethod EmuAPU;
55    SeekMethod SeekAPU;
56#ifdef TARGET_POSIX
57    InitMethod InitAPU;
58    DeInitMethod ResetAPU;
59#endif
60  } m_dll;
61
62  LibraryLoader* m_loader;
63  CStdString m_loader_name;
64
65  char* m_szBuffer;
66  u8* m_pApuRAM;
67  int64_t m_iDataPos;
68};
69
70#endif