LMMS
Loading...
Searching...
No Matches
raw.h
Go to the documentation of this file.
1/*
2 * Adplug - Replayer for many OPL2/OPL3 audio file formats.
3 * Copyright (C) 1999 - 2005 Simon Peter, <dn.tlp@gmx.net>, et al.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 *
19 * raw.h - RAW Player by Simon Peter <dn.tlp@gmx.net>
20 */
21
22/*
23 * Copyright (c) 2015 - 2017 Wraithverge <liam82067@yahoo.com>
24 * - Preliminary support for displaying arbitrary Tag data. (2015)
25 * - Minor realignments. (2017)
26 * - Corrected 'type' string. (2017)
27 * - Finalized Tag support. (2017)
28 */
29
30#include "player.h"
31
32class CrawPlayer: public CPlayer
33{
34public:
35 static CPlayer *factory(Copl *newopl);
36
38 : CPlayer(newopl), data(0)
39 { };
40
42 { if (data) delete[] data; };
43
44 bool load(const std::string &filename, const CFileProvider &fp);
45 bool update();
46 void rewind(int subsong);
47 float getrefresh();
48
49 // Wraithverge: RAC originally captured these files, not RdosPlay.
50 std::string gettype() { return std::string("Raw AdLib Capture"); };
51
52 std::string gettitle() { return std::string(title, 0, 40); };
53 std::string getauthor() { return std::string(author, 0, 60); };
54 std::string getdesc() { return std::string(desc, 0, 1023); };
55
56protected:
57 struct Tdata {
58 unsigned char param, command;
59 } *data;
60
61 unsigned long pos, length;
62 unsigned short clock, speed;
63 unsigned char del;
64 bool songend;
65
66private:
67 char title[40];
68 char author[60];
69 char desc[1023];
70};
Definition fprovide.h:29
CPlayer(Copl *newopl)
Definition player.cpp:34
Definition opl.h:26
CrawPlayer(Copl *newopl)
Definition raw.h:37
unsigned char del
Definition raw.h:63
unsigned short clock
Definition raw.h:62
std::string gettype()
Definition raw.h:50
unsigned long length
Definition raw.h:61
char desc[1023]
Definition raw.h:69
float getrefresh()
Definition raw.cpp:174
unsigned short speed
Definition raw.h:62
char title[40]
Definition raw.h:67
std::string getauthor()
Definition raw.h:53
std::string gettitle()
Definition raw.h:52
unsigned long pos
Definition raw.h:61
char author[60]
Definition raw.h:68
static CPlayer * factory(Copl *newopl)
Definition raw.cpp:35
struct CrawPlayer::Tdata * data
bool update()
Definition raw.cpp:123
void rewind(int subsong)
Definition raw.cpp:168
bool songend
Definition raw.h:64
bool load(const std::string &filename, const CFileProvider &fp)
Definition raw.cpp:40
~CrawPlayer()
Definition raw.h:41
std::string getdesc()
Definition raw.h:54
static char filename[]
Definition features.c:5
JSAMPIMAGE data
Definition jpeglib.h:945
Definition raw.h:57
unsigned char command
Definition raw.h:58
unsigned char param
Definition raw.h:58