1 #ifndef KARAOKELYRICSTEXTKAR_H
2 #define KARAOKELYRICSTEXTKAR_H
5 * Copyright (C) 2005-2013 Team XBMC
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)
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.
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/>.
24 // C++ Interface: karaokelyricstextkar
26 #include "karaokelyricstext.h"
29 //! This class loads MIDI/KAR format lyrics
30 class CKaraokeLyricsTextKAR : public CKaraokeLyricsText
33 CKaraokeLyricsTextKAR( const CStdString & midiFile );
34 ~CKaraokeLyricsTextKAR();
36 //! Parses the lyrics or song file, and loads the lyrics into memory.
37 //! Returns true if the lyrics are successfully loaded, false otherwise.
42 CStdString convertText( const char * data );
44 unsigned char readByte();
45 unsigned short readWord();
46 unsigned int readDword();
48 void readData( void * buf, unsigned int length );
50 unsigned int currentPos() const;
51 void setPos( unsigned int offset );
54 CStdString m_midiFile;
56 // MIDI in-memory information
57 unsigned char * m_midiData;
58 unsigned int m_midiOffset;
59 unsigned int m_midiSize;
60 bool m_reportedInvalidVarField;