PageRenderTime 25ms CodeModel.GetById 14ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/xbmc/cores/paplayer/TimidityCodec.h

http://github.com/xbmc/xbmc
C++ Header | 71 lines | 42 code | 10 blank | 19 comment | 0 complexity | 6816c1f8f9bad6f2a1c6c9056c7eef3c MD5 | raw file
 1#ifndef Timidity_CODEC_H_
 2#define Timidity_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 "DllTimidity.h"
26
27class TimidityCodec : public ICodec
28{
29public:
30  TimidityCodec();
31  virtual ~TimidityCodec();
32
33  virtual bool Init(const CStdString &strFile, unsigned int filecache);
34  virtual void DeInit();
35  virtual int64_t Seek(int64_t iSeekTime);
36  virtual int ReadPCM(BYTE *pBuffer, int size, int *actualsize);
37  virtual bool CanInit();
38  static bool IsSupportedFormat(const CStdString& strExt);
39
40private:
41  LibraryLoader* m_loader;
42  CStdString m_loader_name;
43
44  typedef int (__cdecl *InitMethod) ( const char * soundfont );
45  typedef void* (__cdecl *LoadMethod) ( const char* p1);
46  typedef int (__cdecl *FillMethod) ( void* p1, char* p2, int p3);
47  typedef void  (__cdecl *CleanupMethod)();
48  typedef void  (__cdecl *FreeMethod) ( void* p1);
49  typedef const char* (__cdecl *ErrorMsgMethod) ();
50  typedef unsigned long (__cdecl *LengthMethod) ( void* p1 );
51  typedef unsigned long (__cdecl *SeekMethod) ( void* p1, unsigned long p2);
52
53  struct
54  {
55    InitMethod Init;
56    CleanupMethod Cleanup;
57    ErrorMsgMethod ErrorMsg;
58    LoadMethod LoadMID;
59    FillMethod FillBuffer;
60    FreeMethod FreeMID;
61    LengthMethod GetLength;
62    SeekMethod Seek;
63  } m_dll;
64
65  void * m_mid;
66  int m_iTrack;
67  int64_t m_iDataPos;
68};
69
70#endif
71