annotate src/adplug/core/adl.h @ 1699:11135fc0e183

Fixed WavPack plugin for the new API.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 11 Sep 2007 02:10:49 +0300
parents 368f8ee0a95f
children f1b6f1b2cdb3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
1 /*
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
2 * Adplug - Replayer for many OPL2/OPL3 audio file formats.
964
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
3 * Copyright (C) 1999 - 2007 Simon Peter, <dn.tlp@gmx.net>, et al.
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
4 *
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
5 * This library is free software; you can redistribute it and/or
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
6 * modify it under the terms of the GNU Lesser General Public
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
7 * License as published by the Free Software Foundation; either
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
8 * version 2.1 of the License, or (at your option) any later version.
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
9 *
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
10 * This library is distributed in the hope that it will be useful,
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
13 * Lesser General Public License for more details.
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
14 *
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
15 * You should have received a copy of the GNU Lesser General Public
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
16 * License along with this library; if not, write to the Free Software
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
18 *
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
19 * adl.h - ADL player adaption by Simon Peter <dn.tlp@gmx.net>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
20 */
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
21
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
22 #ifndef H_ADPLUG_ADLPLAYER
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
23 #define H_ADPLUG_ADLPLAYER
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
24
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
25 #include <inttypes.h>
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
26
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
27 #include "player.h"
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
28
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
29 class AdlibDriver;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
30
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
31 class CadlPlayer: public CPlayer
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
32 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
33 public:
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
34 static CPlayer *factory(Copl *newopl);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
35
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
36 CadlPlayer(Copl *newopl);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
37 ~CadlPlayer();
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
38
703
cae46214b8bf [svn] - rework AdPlug to use VFS properly
nenolod
parents: 12
diff changeset
39 bool load(VFSFile *fd, const CFileProvider &fp);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
40 bool update();
964
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
41 void rewind(int subsong = -1);
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
42
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
43 // refresh rate is fixed at 72Hz
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
44 float getrefresh()
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
45 {
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
46 return 72.0f;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
47 }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
48
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
49 unsigned int getsubsongs();
964
368f8ee0a95f [svn] Sync with upstream. Subsong improvements for ADL, new JBM player.
chainsaw
parents: 703
diff changeset
50 unsigned int getsubsong() { return cursubsong; }
0
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
51 std::string gettype() { return std::string("Westwood ADL"); }
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
52
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
53 private:
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
54 int numsubsongs, cursubsong;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
55
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
56 AdlibDriver *_driver;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
57
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
58 uint8_t _trackEntries[120];
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
59 uint8_t *_soundDataPtr;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
60 int _sfxPlayingSound;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
61
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
62 uint8_t _sfxPriority;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
63 uint8_t _sfxFourthByteOfSong;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
64
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
65 int _numSoundTriggers;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
66 const int *_soundTriggers;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
67
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
68 static const int _kyra1NumSoundTriggers;
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
69 static const int _kyra1SoundTriggers[];
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
70
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
71 bool init();
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
72 void process();
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
73 void playTrack(uint8_t track);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
74 void playSoundEffect(uint8_t track);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
75 void play(uint8_t track);
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
76 void unk1();
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
77 void unk2();
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
78 };
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
79
13389e613d67 [svn] - initial import of audacious-plugins tree (lots to do)
nenolod
parents:
diff changeset
80 #endif