From f40bfc9267b13b54e6379dfe7539447662879d24 Mon Sep 17 00:00:00 2001 From: Sean Bartell Date: Sat, 25 Jun 2011 21:32:25 -0400 Subject: Add codecs to librbcodec. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Id7f4717d51ed02d67cb9f9cb3c0ada4a81843f97 Reviewed-on: http://gerrit.rockbox.org/137 Reviewed-by: Nils Wallménius Tested-by: Nils Wallménius --- lib/rbcodec/codecs/libgme/emuadpcm.h | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 lib/rbcodec/codecs/libgme/emuadpcm.h (limited to 'lib/rbcodec/codecs/libgme/emuadpcm.h') 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 @@ +#ifndef __Y8950ADPCM_HH__ +#define __Y8950ADPCM_HH__ + +#include "blargg_common.h" +#include "blargg_source.h" +#include "msxtypes.h" + +typedef unsigned short word; +typedef unsigned __int64 uint64; +struct Y8950; + +struct Y8950Adpcm +{ + struct Y8950* y8950; + + int sampleRate; + int clockRate; + + int ramSize; + int startAddr; + int stopAddr; + int playAddr; + int addrMask; + int memPntr; + bool romBank; + byte* ramBank; + + bool playing; + int volume; + word delta; + unsigned int nowStep, step; + int out, output; + int diff; + int nextLeveling; + int sampleStep; + int volumeWStep; + + byte reg7; + byte reg15; +}; + + +void ADPCM_init(struct Y8950Adpcm* this_, struct Y8950* y8950, byte* ramBank, int sampleRam); +void ADPCM_reset(struct Y8950Adpcm* this_); +void ADPCM_setSampleRate(struct Y8950Adpcm* this_, int sr, int clk); +bool ADPCM_muted(struct Y8950Adpcm* this_); +void ADPCM_writeReg(struct Y8950Adpcm* this_, byte rg, byte data); +byte ADPCM_readReg(struct Y8950Adpcm* this_, byte rg); +int ADPCM_calcSample(struct Y8950Adpcm* this_); + + +#endif -- cgit v1.2.3