物联网操作系统AliOS Things 3.3
uvoice_recorder.h
浏览该文件的文档.
1
/*
2
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
3
*
4
*/
5
6
#ifndef __UVOICE_RECORDER_H__
7
#define __UVOICE_RECORDER_H__
8
15
typedef
enum
{
16
RECORDER_STAT_IDLE
= 0,
17
RECORDER_STAT_READY
,
18
RECORDER_STAT_RUNNING
,
19
RECORDER_STAT_STOP
,
20
RECORDER_STAT_ERROR
,
21
}
recorder_state_t
;
22
24
typedef
struct
{
26
int (*set_sink)(
media_format_t
format,
int
rate,
int
channels,
int
bits,
int
frames,
int
bitrate,
char
*sink);
27
int (*clr_sink)(void);
28
int (*start)(void);
29
int (*stop)(void);
30
int (*get_stream)(uint8_t *buffer,
int
nbytes);
31
int (*get_state)(
recorder_state_t
*state);
32
int (*get_position)(
int
*position);
33
int (*ns_enable)(
int
enable);
34
int (*ec_enable)(
int
enable);
35
int (*agc_enable)(
int
enable);
36
int (*vad_enable)(
int
enable);
37
int (*format_support)(
media_format_t
format);
38
void
*
priv
;
39
}
uvoice_recorder_t
;
40
46
uvoice_recorder_t
*
uvoice_recorder_create
(
void
);
47
55
int
uvoice_recorder_release
(
uvoice_recorder_t
*mrecorder);
56
61
#endif
/* __UVOICE_RECORDER_H__ */
62
recorder_state_t
recorder_state_t
录音状态
Definition:
uvoice_recorder.h:15
uvoice_recorder_create
uvoice_recorder_t * uvoice_recorder_create(void)
uvoice_recorder_release
int uvoice_recorder_release(uvoice_recorder_t *mrecorder)
RECORDER_STAT_IDLE
@ RECORDER_STAT_IDLE
Definition:
uvoice_recorder.h:16
RECORDER_STAT_STOP
@ RECORDER_STAT_STOP
Definition:
uvoice_recorder.h:19
RECORDER_STAT_RUNNING
@ RECORDER_STAT_RUNNING
Definition:
uvoice_recorder.h:18
RECORDER_STAT_READY
@ RECORDER_STAT_READY
Definition:
uvoice_recorder.h:17
RECORDER_STAT_ERROR
@ RECORDER_STAT_ERROR
Definition:
uvoice_recorder.h:20
media_format_t
media_format_t
Definition:
uvoice_types.h:22
uvoice_recorder_t
录音接口
Definition:
uvoice_recorder.h:24
uvoice_recorder_t::priv
void * priv
Definition:
uvoice_recorder.h:38
components
uvoice
include
uvoice_recorder.h
生成于 2021年 四月 9日 星期五 13:02:34 , 为 物联网操作系统AliOS Things 3.3使用
1.9.1