www.pudn.com > nandflash_1G08U0A.rar > ADPCM.H


/* 
 * adpcm.h 
 *   
 * Ver0.10 98/ 7/22 H.Matsuoka  Start 
 * Ver0.11 98/ 7/31 H.Matsuoka  Change #define ADPCM_XX. same VSX 
 * Ver0.20 98/10/30 T.Ichikawa  Add #ifdef MSVC to share source toola and  
 *                              library. 
 * Ver0.30 98/11/13 T.Ichikawa  Moved ADPCM_FILE_ID from voxlib.h 
 * Ver0.31 99/ 2/17 H.Matsuoka  Del Japanese comment 
 *                              Rename adpcm_sample_cnt adpcm_code_size 
 * 
 */ 
 
 
 
#ifndef ADPCM_H 
#define ADPCM_H 
 
#define ADPCM_16K   (1) 
#define ADPCM_24K   (2) 
#define ADPCM_32K   (4) 
#define ADPCM_40K   (8) 
 
 
/* 
 *  ADPCM data format 
 *  
 *  <------- ADPCM_HEADER_SIZE --------> 
 *  +-------+------+------+------+        +------------+ 
 *  |FILE_ID|size  |offset|format|        |ADPCM   code| 
 *  +-------+------+------+------+        +------------+ 
 *    1byte  4      4      1      <------>  
 *                                       offset   
 *                                       (byte)   
 */ 
 
 
/* Moved this line from voxlib.h - 1998.Nov.13 T.Ichikawa */ 
#define ADPCM_FILE_ID     (0x41) 
#define ADPCM_HEADER_SIZE (10) 
 
typedef struct 
{ 
    long          adpcm_code_size;    /* size of adpcm code (bytes) */ 
    long          adpcm_code_offset;  /* offset of adpcm code */ 
    unsigned char adpcm_format;       /* adpcm compress mode */ 
} adpcmParams; 
 
 
#ifndef MSVC 
int adpcmDecode(unsigned char*, short *); 
int adpcmEncode(short*, int, unsigned char*); 
int adpcmWriteHeader(adpcmParams*, int, unsigned char*); 
int adpcmReadHeader(unsigned char*, adpcmParams*); 
int adpcmInit(adpcmParams*, int); 
#endif /* MSVC */ 
#endif  /* ADPCM_H */