Debian Codegraph @

src/opl.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2002-2010 The DOSBox Team
3 * OPL2/OPL3 emulation library
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
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #ifndef OPL_H
21 #define OPL_Hcxx . . $ `src/opl.h:21:9`!
22 /*
23 * Originally based on ADLIBEMU.C, an AdLib/OPL2 emulation library by Ken Silverman
24 * Copyright (C) 1998-2001 Ken Silverman
25 * Ken Silverman's official web site: "http://www.advsys.net/ken"
26 */
27
28 #include <stdint.h>
29
30 typedef uintptr_tcxx . . $ uintptr_t# Bitucxx . . $ Bitu#;
31 typedef intptr_tcxx . . $ intptr_t# Bitscxx . . $ Bits#;
32 typedef uint32_tcxx . . $ uint32_t# Bit32ucxx . . $ Bit32u#;
33 typedef int32_tcxx . . $ int32_t# Bit32scxx . . $ Bit32s#;
34 typedef uint16_tcxx . . $ uint16_t# Bit16ucxx . . $ Bit16u#;
35 typedef int16_tcxx . . $ int16_t# Bit16scxx . . $ Bit16s#;
36 typedef uint8_tcxx . . $ uint8_t# Bit8ucxx . . $ Bit8u#;
37 typedef int8_tcxx . . $ int8_t# Bit8scxx . . $ Bit8s#;
38
39 // general functions
40 void adlib_initcxx . . $ adlib_init(cb2f890c2fdad230).(Bit32ucxx . . $ Bit32u# samplerate);
41 void adlib_writecxx . . $ adlib_write(802fe934043824c).(Bitucxx . . $ Bitu# idx, Bit8ucxx . . $ Bit8u# val);
42 void adlib_getsamplecxx . . $ adlib_getsample(f9643a6d2bb7d59).(Bit16scxx . . $ Bit16s#* sndptr, Bitscxx . . $ Bits# numsamples);
43
44 Bitucxx . . $ Bitu# adlib_reg_readcxx . . $ adlib_reg_read(ecdaa1632f49f591).(Bitucxx . . $ Bitu# port);
45 void adlib_write_indexcxx . . $ adlib_write_index(802fe934043824c).(Bitucxx . . $ Bitu# port, Bit8ucxx . . $ Bit8u# val);
46
47 #define opl_initcxx . . $ `src/opl.h:47:9`!() adlib_init(audioSampleRate)
48 #define opl_writecxx . . $ `src/opl.h:48:9`!(reg, val) adlib_write(reg, val)
49 #define opl_updatecxx . . $ `src/opl.h:49:9`!(buf, num) adlib_getsample(buf, num)
50
51 #endif /* OPL_H */