summaryrefslogtreecommitdiff
path: root/lib/rbcodec/codecs/libgme/emuadpcm.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs/libgme/emuadpcm.h')
-rw-r--r--lib/rbcodec/codecs/libgme/emuadpcm.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/libgme/emuadpcm.h b/lib/rbcodec/codecs/libgme/emuadpcm.h
new file mode 100644
index 0000000000..0fc39a1709
--- /dev/null
+++ b/lib/rbcodec/codecs/libgme/emuadpcm.h
@@ -0,0 +1,52 @@
1#ifndef __Y8950ADPCM_HH__
2#define __Y8950ADPCM_HH__
3
4#include "blargg_common.h"
5#include "blargg_source.h"
6#include "msxtypes.h"
7
8typedef unsigned short word;
9typedef unsigned __int64 uint64;
10struct Y8950;
11
12struct Y8950Adpcm
13{
14 struct Y8950* y8950;
15
16 int sampleRate;
17 int clockRate;
18
19 int ramSize;
20 int startAddr;
21 int stopAddr;
22 int playAddr;
23 int addrMask;
24 int memPntr;
25 bool romBank;
26 byte* ramBank;
27
28 bool playing;
29 int volume;
30 word delta;
31 unsigned int nowStep, step;
32 int out, output;
33 int diff;
34 int nextLeveling;
35 int sampleStep;
36 int volumeWStep;
37
38 byte reg7;
39 byte reg15;
40};
41
42
43void ADPCM_init(struct Y8950Adpcm* this_, struct Y8950* y8950, byte* ramBank, int sampleRam);
44void ADPCM_reset(struct Y8950Adpcm* this_);
45void ADPCM_setSampleRate(struct Y8950Adpcm* this_, int sr, int clk);
46bool ADPCM_muted(struct Y8950Adpcm* this_);
47void ADPCM_writeReg(struct Y8950Adpcm* this_, byte rg, byte data);
48byte ADPCM_readReg(struct Y8950Adpcm* this_, byte rg);
49int ADPCM_calcSample(struct Y8950Adpcm* this_);
50
51
52#endif