2 * Adplug - Replayer for many OPL2/OPL3 audio file formats.
3 * Copyright (C) 1999 - 2003 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 * [xad] BMF player, by Riven the Mage <riven@ok.ru>
24 class CxadbmfPlayer: public CxadPlayer
27 static CPlayer *factory(Copl *newopl);
29 CxadbmfPlayer(Copl *newopl): CxadPlayer(newopl)
35 enum { BMF0_9B, BMF1_1, BMF1_2 };
42 unsigned char instrument;
44 unsigned char cmd_data;
49 unsigned char version;
58 unsigned char data[13];
61 bmf_event streams[9][1024];
67 unsigned short stream_position;
69 unsigned short loop_position;
70 unsigned char loop_counter;
74 bool xadplayer_load();
75 void xadplayer_rewind(int subsong);
76 void xadplayer_update();
77 float xadplayer_getrefresh();
78 std::string xadplayer_gettype();
79 std::string xadplayer_gettitle();
80 std::string xadplayer_getauthor();
81 std::string xadplayer_getinstrument(unsigned int i);
82 unsigned int xadplayer_getinstruments();
85 static const unsigned char bmf_adlib_registers[117];
86 static const unsigned short bmf_notes[12];
87 static const unsigned short bmf_notes_2[12];
88 static const unsigned char bmf_default_instrument[13];
90 int __bmf_convert_stream(unsigned char *stream, int channel);