CI130X SDK API手册  2.2.0
本手册用于描述CI130X SDK各个组件和驱动API
ci_voice_head.h
浏览该文件的文档.
1 
11 #ifndef CI_VOICE_HEAD_H_
12 #define CI_VOICE_HEAD_H_
13 
14 #include <stdint.h>
15 
16 #pragma pack(1)
17 typedef struct
18 {
19  char RIFF[4]; //"RIFF"
20  uint32_t file_size; //文件大小
21  char WAVE[4]; //"WAVE"
22  char fmt[4]; //"fmt "
23  uint32_t fmt_chunk_size; //fmt chunk大小
24  uint16_t wav_formatag; //编码格式: 0x0011---IMA ADPCM 0x0001---PCM
25  uint16_t nChannls; //声道数,单声道为1,双声道为2
26  uint32_t nSamplesPerSec; //采样频率
27  uint32_t nAvgBytesperSec;//码率 注:byte/s,即比特率/8
28  uint16_t nBlockAlign; //块对齐
29  uint16_t wBitsPerSample; //WAVE文件的采样大小
30 } WAVEFORMATEX;
31 
32 #pragma pack(1)
33 typedef struct{
34  char fact[4]; //"fact"
35  uint32_t chunksize;
36  uint32_t datafactsize; //数据转换为PCM格式后的大小。
37 }factchunk;
38 
39 #pragma pack(1)
40 typedef struct
41 {
42  char data[4]; //"data"
43  uint32_t chunksize;
44 }data_chunk;
45 
46 #pragma pack(1)
47 typedef struct
48 {
49  WAVEFORMATEX wfmt; //36Byte
50  data_chunk dchunk; //8Byte
52 
53 #pragma pack(1)
54 typedef struct
55 {
56  WAVEFORMATEX wfmt; //36Byte
57  uint16_t sbSize;
58  data_chunk dchunk; //8Byte
60 
61 #pragma pack(1)
62 typedef struct
63 {
64  WAVEFORMATEX wfmt; //36Byte
65  uint16_t sbSize;
66  uint16_t nSamplesPerBlock;
67  data_chunk dchunk; //8Byte
69 
70 #pragma pack(1)
71 typedef struct
72 {
73  WAVEFORMATEX wfmt; //36Byte
74  uint16_t sbSize;
75  uint16_t nSamplesPerBlock;
76  factchunk fchunk; //12Byte
77  data_chunk dchunk; //8Byte
79 
80 #pragma pack(1)
81 typedef struct
82 {
83  char ID3[3]; //"ID3"
84  char ver; //3
85  char revision; //0
86  char flag; //0
87  uint32_t total_frame_size; //标签帧大小
88  char frame_ID[4]; //"PRIV"
89  uint32_t frame_size; //PRIV大小
90  uint16_t frame_flag; //0
91  char CI[2]; //"CI"
92  uint32_t file_size; //文件大小
93  uint32_t pcm_size; //PCM大小
95 
96 
97 #pragma pack(1)
98 typedef struct
99 {
100  char head; //0x00
101  char size[3]; //0x0 0x0 0x22
102  char info[34];
104 
105 #pragma pack(1)
106 typedef struct
107 {
108  char head; //0x84
109  char size[3]; //0x0 0x0 0x11
110  char ci_flag_str[9]; //"filesize="
111  char ci_size_str[8];
113 
114 #pragma pack(1)
115 typedef struct
116 {
117  char FLAC[4]; //"fLaC"
121 
122 #pragma pack(1)
123 typedef union
124 {
132 
133 #endif /* CI_VOICE_HEAD_H_ */
Definition: ci_voice_head.h:98
Definition: ci_voice_head.h:106
uint32_t nSamplesPerSec
Definition: ci_voice_head.h:26
uint16_t wBitsPerSample
Definition: ci_voice_head.h:29
Definition: ci_voice_head.h:17
Definition: ci_voice_head.h:71
uint16_t frame_flag
Definition: ci_voice_head.h:90
uint32_t frame_size
Definition: ci_voice_head.h:89
uint16_t nBlockAlign
Definition: ci_voice_head.h:28
Definition: ci_voice_head.h:40
WAVEFORMAT_MP3 wave_ci_mp3
Definition: ci_voice_head.h:129
uint32_t datafactsize
Definition: ci_voice_head.h:36
uint32_t nAvgBytesperSec
Definition: ci_voice_head.h:27
char flag
Definition: ci_voice_head.h:86
streaminfo_block streaminfo
Definition: ci_voice_head.h:118
Definition: ci_voice_head.h:47
uint32_t fmt_chunk_size
Definition: ci_voice_head.h:23
uint32_t total_frame_size
Definition: ci_voice_head.h:87
Definition: ci_voice_head.h:33
Definition: ci_voice_head.h:54
char ver
Definition: ci_voice_head.h:84
WAVEFORMAT_PCM_46 wave_pcm_46
Definition: ci_voice_head.h:126
vorbis_comment_block vorbis_comment
Definition: ci_voice_head.h:119
WAVEFORMAT_PCM_48 wave_pcm_48
Definition: ci_voice_head.h:127
uint32_t chunksize
Definition: ci_voice_head.h:35
Definition: ci_voice_head.h:81
Definition: ci_voice_head.h:62
data_chunk dchunk
Definition: ci_voice_head.h:50
uint16_t wav_formatag
Definition: ci_voice_head.h:24
uint16_t sbSize
Definition: ci_voice_head.h:57
uint16_t nChannls
Definition: ci_voice_head.h:25
WAVEFORMAT_FLAC wave_ci_flac
Definition: ci_voice_head.h:130
uint32_t file_size
Definition: ci_voice_head.h:20
Definition: ci_voice_head.h:115
uint32_t pcm_size
Definition: ci_voice_head.h:93
char head
Definition: ci_voice_head.h:100
WAVEFORMAT_PCM_44 wave_pcm_44
Definition: ci_voice_head.h:125
WAVEFORMATEX wfmt
Definition: ci_voice_head.h:49
factchunk fchunk
Definition: ci_voice_head.h:76
Definition: ci_voice_head.h:123
char revision
Definition: ci_voice_head.h:85
uint16_t nSamplesPerBlock
Definition: ci_voice_head.h:66
WAVEFORMAT_IMAADPCM wave_adpcm
Definition: ci_voice_head.h:128