2 * Adplug - Replayer for many OPL2/OPL3 audio file formats.
3 * Copyright (C) 1999 - 2007 Simon Peter <dn.tlp@gmx.net>, et al.
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.
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.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 * jbm.h - JBM Player by Dennis Lindroos <lindroos@nls.fi>
22 #ifndef H_ADPLUG_JBMPLAYER
23 #define H_ADPLUG_JBMPLAYER
27 class CjbmPlayer: public CPlayer
30 static CPlayer *factory(Copl *newopl);
32 CjbmPlayer(Copl *newopl) : CPlayer(newopl), m(0)
35 { if(m != NULL) delete [] m; }
37 bool load(const std::string &filename, const CFileProvider &fp);
39 void rewind(int subsong);
46 return std::string(flags&1 ? "JBM Adlib Music [rhythm mode]" :
49 std::string getauthor()
50 { return std::string("Johannes Bjerregaard"); }
56 unsigned short flags, voicemask;
57 unsigned short seqtable, seqcount;
58 unsigned short instable, inscount;
59 unsigned short *sequences;
63 unsigned short trkpos, trkstart, seqpos;
64 unsigned char seqno, note;
69 unsigned char ivol, dummy;
75 //void calc_opl_frequency(JBMVoice *);
76 void set_opl_instrument(int, JBMVoice *);
77 void opl_noteonoff(int, JBMVoice *, bool);