1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 
5 #ifndef __UVOICE_TYPES_H__
6 #define __UVOICE_TYPES_H__
7 
8 /** @defgroup uvoice_aos_api uvoice
9  * @{
10  */
11 
12 /**
13  * @}
14  */
15 
16 /** @defgroup uvoice_types_api uvoice_types
17  *  @ingroup uvoice_aos_api
18  *  @ingroup uvoice_aos_api
19  * @{
20  */
21 
22 typedef enum {
23     MEDIA_FMT_UNKNOWN = 0,
24     MEDIA_FMT_PCM,
25     MEDIA_FMT_WAV,
26     MEDIA_FMT_MP3,
27     MEDIA_FMT_AAC,
28     MEDIA_FMT_M4A,
29     MEDIA_FMT_OGG,
30     MEDIA_FMT_OPS,
31     MEDIA_FMT_SPX,
32     MEDIA_FMT_WMA,
33     MEDIA_FMT_AMR,
34     MEDIA_FMT_AMRWB,
35     MEDIA_FMT_FLAC,
36     MEDIA_FMT_COUNT,
37 } media_format_t;
38 
39 typedef enum {
40     AUDIO_OUT_DEVICE_SPEAKER = 1,
41     AUDIO_OUT_DEVICE_HEADPHONE,
42     AUDIO_OUT_DEVICE_HEADSET,
43     AUDIO_OUT_DEVICE_RECEIVER,
44     AUDIO_OUT_DEVICE_SPEAKER_AND_HEADPHONE,
45     AUDIO_OUT_DEVICE_SPEAKER_AND_HEADSET,
46     AUDIO_OUT_DEVICE_MAX,
47 } audio_out_device_t;
48 
49 typedef struct {
50     int used;
51     int active_high;
52     int pin;
53     int delay_ms;
54 } audio_extpa_info_t;
55 
56 typedef struct {
57     char name[32];
58     char author[32];
59     char album[32];
60     char year[8];
61     int valid;
62     unsigned char type;
63     int32_t bitrate;
64     int32_t media_size;
65     int32_t duration;
66 } media_info_t;
67 
68 typedef struct {
69     int place; /* 0: none, 1: file, 2: mem */
70     int mem_size; /* cache memory size in KB */
71     char file_path[128]; /* cache file full path */
72 } cache_config_t;
73 
74 
75 /**
76  * @}
77  */
78 
79 #endif /* __UVOICE_TYPES_H__ */
80