smp16bit.h

来自「十七种模拟器源代码 非常有用的作课程设计不可缺少的」· C头文件 代码 · 共 57 行

H
57
字号
/******************************************************************************//*                                                                            *//*     16-BIT SAMPLE PLAYBACK (odd samples - nichibutsu dac, cabal adpcm)     *//*                                                                            *//******************************************************************************/#ifndef __SMP16_H__#define __SMP16_H__void decode_sample_adpcm(UINT8 *src, UINT32 size, UINT16 *dest, int volume);void decode_sample_8bit(UINT8 *src, UINT32 size, UINT16 *dest, int volume);#define SMP16BF_MAX     (2)#define SMP16BF_CHANNEL (1)#define SMP16BF_NUMBUF  (1)typedef struct SMP16_ROM{   UINT8 *data;					// pointer to rom   UINT32 size;					// size of rom   UINT32 type;					// 0 - adpcm} SMP16_ROM;struct SMP16buffer_interface{   int num;					// number of chips   int sample_rate[SMP16BF_MAX];		// rate for each chip   SMP16_ROM *rom[SMP16BF_MAX];			// list of roms};typedef struct SMP16_SAMPLE{   UINT32 len;                  			// length (in samples?)   INT16 *data;                        		// sample data (16 bit?)} SMP16_SAMPLE;typedef struct SMP16rec{  int rate;					// rate  int command;  unsigned int offset, req_len;  signed short *req_buf;  unsigned int add;  UINT32 samples;				// sample count  SMP16_SAMPLE *sample_decode;			// decoded info} SMP16Rec;int SMP16buffer_sh_start( struct SMP16buffer_interface *interface );void SMP16buffer_sh_stop( void );void SMP16buffer_request( int num, int code );int  SMP16buffer_status( int num );void SMP16buffer_UpdateOne( int num, void *buffer, int length );#endif/******************************************************************************/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?