LMMS
Loading...
Searching...
No Matches
dro.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 * dro.h - DOSBox Raw OPL Player by Sjoerd van der Berg <harekiet@zophar.net>
20 * Refactored to better match dro2.h
21 * by Laurence Dougal Myers <jestarjokin@jestarjokin.net>
22 */
23
24/*
25 * Copyright (c) 2012 - 2017 Wraithverge <liam82067@yahoo.com>
26 * - Realigned and re-ordered sections.
27 * - Removed unused garbage.
28 * - Finalized support for displaying arbitrary Tag data.
29 */
30
31#include <stdint.h> // for uintxx_t
32#include "player.h"
33
34class CdroPlayer: public CPlayer
35{
36 protected:
37 static const uint8_t iCmdDelayS = 0x00; // Wraithverge: fixed this with "static".
38 static const uint8_t iCmdDelayL = 0x01; // Wraithverge: fixed this with "static".
39
42 int iPos;
43 int iDelay;
44
45 private:
46 char title[40];
47 char author[40];
48 char desc[1023];
49
50 public:
51 static CPlayer *factory(Copl *newopl);
52
53 CdroPlayer(Copl *newopl);
55
56 bool load(const std::string &filename, const CFileProvider &fp);
57 bool update();
58 void rewind(int subsong);
59 float getrefresh();
60
61 std::string gettype()
62 {
63 return std::string("DOSBox Raw OPL v0.1");
64 }
65
66 std::string gettitle() { return std::string(title, 0, 40); };
67 std::string getauthor() { return std::string(author, 0, 40); };
68 std::string getdesc() { return std::string(desc, 0, 1023); };
69};
Definition fprovide.h:29
CPlayer(Copl *newopl)
Definition player.cpp:34
int iDelay
Definition dro.h:43
float getrefresh()
Definition dro.cpp:206
static const uint8_t iCmdDelayL
Definition dro.h:38
char desc[1023]
Definition dro.h:48
char author[40]
Definition dro.h:47
~CdroPlayer()
Definition dro.cpp:52
bool update()
Definition dro.cpp:144
static CPlayer * factory(Copl *newopl)
Definition dro.cpp:41
CdroPlayer(Copl *newopl)
Definition dro.cpp:46
std::string getdesc()
Definition dro.h:68
int iLength
Definition dro.h:41
char title[40]
Definition dro.h:46
uint8_t * data
Definition dro.h:40
std::string gettype()
Definition dro.h:61
std::string getauthor()
Definition dro.h:67
static const uint8_t iCmdDelayS
Definition dro.h:37
std::string gettitle()
Definition dro.h:66
bool load(const std::string &filename, const CFileProvider &fp)
Definition dro.cpp:57
void rewind(int subsong)
Definition dro.cpp:183
int iPos
Definition dro.h:42
Definition opl.h:26
static char filename[]
Definition features.c:5
unsigned char uint8_t
Definition mid.cpp:98