Submit initial patch from FS#12176. Adds support for several new game music formats...
[kugel-rb.git] / apps / codecs / libgme / emuadpcm.h
blob0fc39a17099c3c234ba5a2e07af214e615787a6b
1 #ifndef __Y8950ADPCM_HH__
2 #define __Y8950ADPCM_HH__
4 #include "blargg_common.h"
5 #include "blargg_source.h"
6 #include "msxtypes.h"
8 typedef unsigned short word;
9 typedef unsigned __int64 uint64;
10 struct Y8950;
12 struct Y8950Adpcm
14 struct Y8950* y8950;
16 int sampleRate;
17 int clockRate;
19 int ramSize;
20 int startAddr;
21 int stopAddr;
22 int playAddr;
23 int addrMask;
24 int memPntr;
25 bool romBank;
26 byte* ramBank;
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;
38 byte reg7;
39 byte reg15;
43 void ADPCM_init(struct Y8950Adpcm* this_, struct Y8950* y8950, byte* ramBank, int sampleRam);
44 void ADPCM_reset(struct Y8950Adpcm* this_);
45 void ADPCM_setSampleRate(struct Y8950Adpcm* this_, int sr, int clk);
46 bool ADPCM_muted(struct Y8950Adpcm* this_);
47 void ADPCM_writeReg(struct Y8950Adpcm* this_, byte rg, byte data);
48 byte ADPCM_readReg(struct Y8950Adpcm* this_, byte rg);
49 int ADPCM_calcSample(struct Y8950Adpcm* this_);
52 #endif