uvoice_event.h
浏览该文件的文档.
1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 
5 #ifndef __UVOICE_EVENT_H__
6 #define __UVOICE_EVENT_H__
7 
13 #define UVOICE_EV_PLAYER 0x0111
14 #define UVOICE_CODE_PLAYER_STATE 1
15 #define UVOICE_CODE_PALYER_CACHE_CPLT 2
16 #define UVOICE_CODE_PALYER_DLOAD_CPLT 3
17 
18 #define UVOICE_EV_RECORDER 0x0112
19 #define UVOICE_CODE_RECORDER_STATE 1
20 
21 #define UVOICE_EV_SW 0x0113
22 #define UVOICE_CODE_HEADPHONE 1
23 #define UVOICE_CODE_HEADSET 2
24 
25 #define UVOICE_EV_ST 0x0114
26 #define UVOICE_CODE_VAD_START 1
27 #define UVOICE_CODE_VAD_END 2
28 #define UVOICE_CODE_VOICE_WAKEUP 3
29 
30 #define UVOICE_EV_ASR_RESULT 0x0115
31 
32 
33 typedef struct {
34  uint16_t type;
35  uint16_t code;
36  int value;
38 
39 typedef void (*uvoice_event_cb)(uvoice_event_t *event, void *data);
40 int uvoice_event_post(uint16_t type, uint16_t code, int value);
41 int uvoice_event_register(uint16_t type, uvoice_event_cb cb, void *data);
42 int uvoice_event_unregister(uint16_t type, uvoice_event_cb cb, void *data);
43 
48 #endif /* __UVOICE_EVENT_H__ */
49 
int uvoice_event_register(uint16_t type, uvoice_event_cb cb, void *data)
int uvoice_event_unregister(uint16_t type, uvoice_event_cb cb, void *data)
void(* uvoice_event_cb)(uvoice_event_t *event, void *data)
Definition: uvoice_event.h:39
int uvoice_event_post(uint16_t type, uint16_t code, int value)
uint16_t code
Definition: uvoice_event.h:35
uint16_t type
Definition: uvoice_event.h:34