annotate Plugins/Input/adplug/core/temuopl.h @ 843:1cd8716972df trunk

[svn] Sync core with upstream. Also, rename plugin from AdPlug to AdLib synthesizer, by request of Giacomo.
author chainsaw
date Sat, 18 Mar 2006 09:28:08 -0800
parents 15ca2ea93a30
children f12d7e208b43
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
1 /*
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
2 * Adplug - Replayer for many OPL2/OPL3 audio file formats.
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
3 * Copyright (C) 1999 - 2004 Simon Peter, <dn.tlp@gmx.net>, et al.
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
4 *
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
5 * This library is free software; you can redistribute it and/or
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
6 * modify it under the terms of the GNU Lesser General Public
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
7 * License as published by the Free Software Foundation; either
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
8 * version 2.1 of the License, or (at your option) any later version.
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
9 *
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
10 * This library is distributed in the hope that it will be useful,
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
13 * Lesser General Public License for more details.
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
14 *
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
15 * You should have received a copy of the GNU Lesser General Public
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
16 * License along with this library; if not, write to the Free Software
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
18 *
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
19 * temuopl.h - Tatsuyuki Satoh's OPL2 emulator, by Simon Peter <dn.tlp@gmx.net>
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
20 */
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
21
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
22 #ifndef H_ADPLUG_TEMUOPL
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
23 #define H_ADPLUG_TEMUOPL
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
24
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
25 #include "opl.h"
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
26 extern "C" {
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
27 #include "fmopl.h"
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
28 }
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
29
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
30 class CTemuopl: public Copl
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
31 {
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
32 public:
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
33 CTemuopl(int rate, bool bit16, bool usestereo); // rate = sample rate
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
34 virtual ~CTemuopl();
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
35
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
36 void update(short *buf, int samples); // fill buffer
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
37
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
38 // template methods
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
39 void write(int reg, int val);
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
40 void init();
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
41
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
42 private:
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
43 bool use16bit,stereo;
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
44 FM_OPL *opl; // holds emulator data
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
45 };
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
46
15ca2ea93a30 [svn] Sync with upstream CVS. This implements RIX playback.
chainsaw
parents:
diff changeset
47 #endif