/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. * Copyright (C) 2005-2013 Team XBMC
  5. * http://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, see
  19. * <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #include "ICodec.h"
  23. #include "snesapu/Types.h"
  24. #include "../DllLoader/LibraryLoader.h"
  25. class SPCCodec : public ICodec
  26. {
  27. public:
  28. SPCCodec();
  29. virtual ~SPCCodec();
  30. virtual bool Init(const CStdString &strFile, unsigned int filecache);
  31. virtual void DeInit();
  32. virtual int64_t Seek(int64_t iSeekTime);
  33. virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize);
  34. virtual bool CanInit();
  35. private:
  36. #ifdef TARGET_POSIX
  37. typedef void (__cdecl *LoadMethod) ( const void* p1);
  38. typedef void* (__cdecl *EmuMethod) ( void *p1, u32 p2, u32 p3);
  39. typedef void (__cdecl *SeekMethod) ( u32 p1, b8 p2 );
  40. typedef u32 (__cdecl *InitMethod)(void);
  41. typedef void (__cdecl *DeInitMethod)(void);
  42. #else
  43. typedef void (__stdcall* LoadMethod) ( const void* p1);
  44. typedef void* (__stdcall * EmuMethod) ( void *p1, u32 p2, u32 p3);
  45. typedef void (__stdcall * SeekMethod) ( u32 p1, b8 p2 );
  46. #endif
  47. struct
  48. {
  49. LoadMethod LoadSPCFile;
  50. EmuMethod EmuAPU;
  51. SeekMethod SeekAPU;
  52. #ifdef TARGET_POSIX
  53. InitMethod InitAPU;
  54. DeInitMethod ResetAPU;
  55. #endif
  56. } m_dll;
  57. LibraryLoader* m_loader;
  58. CStdString m_loader_name;
  59. char* m_szBuffer;
  60. u8* m_pApuRAM;
  61. int64_t m_iDataPos;
  62. };
  63. #endif