xt-sdk 文档
v1.0.3
xt-sdk 嵌入式 SDK API 参考
Toggle main menu visibility
载入中...
搜索中...
未找到
xt_audio_types.h
浏览该文件的文档.
1
10
11
#ifndef __XT_AUDIO_TYPES_H__
12
#define __XT_AUDIO_TYPES_H__
13
20
21
/* ==================== [Includes] ========================================== */
22
23
#include "
xt_error.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
35
36
/* ==================== [Defines] =========================================== */
37
38
/* ==================== [Typedefs] ========================================== */
39
43
typedef
void
*
xt_audio_t
;
44
48
typedef
uint8_t
xt_audio_mode_t
;
49
53
enum
{
54
XT_AUDIO_MODE_OUT
= (1 << 0),
55
XT_AUDIO_MODE_IN
= (1 << 1),
56
57
XT_AUDIO_MODE_WRITE
= (1 << 0),
58
XT_AUDIO_MODE_READ
= (1 << 1),
59
60
XT_AUDIO_MODE_PLAY
= (1 << 0),
61
XT_AUDIO_MODE_RECORD
= (1 << 1),
62
63
XT_AUDIO_MODE_ENC
= (1 << 0),
64
XT_AUDIO_MODE_DEC
= (1 << 1),
65
};
66
74
typedef
void (*
xt_audio_cb_t
)(
xt_audio_t
hdl,
int
evt,
void
*info);
75
79
typedef
uint8_t
xt_audio_prior_t
;
80
84
struct
xt_audio_format
{
85
uint16_t
sample_freq
;
86
uint8_t
sample_bits
;
87
uint8_t
channel_num
;
88
uint16_t
frame_size
;
89
};
90
91
/* ==================== [Global Prototypes] ================================= */
92
93
/* ==================== [Macros] ============================================ */
94
/* xt_audio_types */
96
97
#ifdef __cplusplus
98
}
/* extern "C" */
99
#endif
100
/* xt_audio */
102
103
#endif
/* __XT_AUDIO_TYPES_H__ */
xt_audio_t
void * xt_audio_t
音频设备句柄类型
定义
xt_audio_types.h:43
xt_audio_mode_t
uint8_t xt_audio_mode_t
音频模式类型
定义
xt_audio_types.h:48
xt_audio_prior_t
uint8_t xt_audio_prior_t
音频优先级类型
定义
xt_audio_types.h:79
xt_audio_cb_t
void(* xt_audio_cb_t)(xt_audio_t hdl, int evt, void *info)
音频通用回调函数类型
定义
xt_audio_types.h:74
XT_AUDIO_MODE_ENC
@ XT_AUDIO_MODE_ENC
定义
xt_audio_types.h:63
XT_AUDIO_MODE_DEC
@ XT_AUDIO_MODE_DEC
定义
xt_audio_types.h:64
XT_AUDIO_MODE_OUT
@ XT_AUDIO_MODE_OUT
定义
xt_audio_types.h:54
XT_AUDIO_MODE_RECORD
@ XT_AUDIO_MODE_RECORD
定义
xt_audio_types.h:61
XT_AUDIO_MODE_READ
@ XT_AUDIO_MODE_READ
定义
xt_audio_types.h:58
XT_AUDIO_MODE_IN
@ XT_AUDIO_MODE_IN
定义
xt_audio_types.h:55
XT_AUDIO_MODE_PLAY
@ XT_AUDIO_MODE_PLAY
定义
xt_audio_types.h:60
XT_AUDIO_MODE_WRITE
@ XT_AUDIO_MODE_WRITE
定义
xt_audio_types.h:57
xt_audio_format
音频格式描述结构体
定义
xt_audio_types.h:84
xt_audio_format::sample_bits
uint8_t sample_bits
定义
xt_audio_types.h:86
xt_audio_format::channel_num
uint8_t channel_num
定义
xt_audio_types.h:87
xt_audio_format::frame_size
uint16_t frame_size
定义
xt_audio_types.h:88
xt_audio_format::sample_freq
uint16_t sample_freq
定义
xt_audio_types.h:85
xt_error.h
XTINY 错误码定义
platforms
components
xtiny
xt_audio
xt_audio_types.h
生成于
, 为 xt-sdk 文档使用
1.17.0