Mercurial > audlegacy
annotate Plugins/Input/adplug/core/emuopl.h @ 1458:f12d7e208b43 trunk
[svn] Update FSF address in copyright notices. Update autotools templates.
author | chainsaw |
---|---|
date | Wed, 02 Aug 2006 15:44:07 -0700 |
parents | 15ca2ea93a30 |
children | 705d4c089fce |
rev | line source |
---|---|
359 | 1 /* |
2 * Adplug - Replayer for many OPL2/OPL3 audio file formats. | |
428
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
3 * Copyright (C) 1999 - 2005 Simon Peter, <dn.tlp@gmx.net>, et al. |
359 | 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 | |
1458
f12d7e208b43
[svn] Update FSF address in copyright notices. Update autotools templates.
chainsaw
parents:
428
diff
changeset
|
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1307 USA |
359 | 18 * |
19 * emuopl.h - Emulated OPL, by Simon Peter <dn.tlp@gmx.net> | |
20 */ | |
21 | |
22 #ifndef H_ADPLUG_EMUOPL | |
23 #define H_ADPLUG_EMUOPL | |
24 | |
25 #include "opl.h" | |
26 extern "C" { | |
27 #include "fmopl.h" | |
28 } | |
29 | |
30 class CEmuopl: public Copl | |
31 { | |
428
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
32 public: |
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
33 CEmuopl(int rate, bool bit16, bool usestereo); // rate = sample rate |
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
34 virtual ~CEmuopl(); |
359 | 35 |
428
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
36 void update(short *buf, int samples); // fill buffer |
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
37 void write(int reg, int val); |
359 | 38 |
428
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
39 void init(); |
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
40 void settype(ChipType type); |
359 | 41 |
428
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
42 private: |
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
43 bool use16bit, stereo; |
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
44 FM_OPL *opl[2]; // OPL2 emulator data |
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
45 short *mixbuf0, *mixbuf1; |
15ca2ea93a30
[svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
359
diff
changeset
|
46 int mixbufSamples; |
359 | 47 }; |
48 | |
49 #endif |