uvoice_types.h
浏览该文件的文档.
1
/*
2
* Copyright (C) 2015-2020 Alibaba Group Holding Limited
3
*/
4
5
#ifndef __UVOICE_TYPES_H__
6
#define __UVOICE_TYPES_H__
7
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
79
#endif
/* __UVOICE_TYPES_H__ */
audio_out_device_t
audio_out_device_t
Definition:
uvoice_types.h:39
media_format_t
media_format_t
Definition:
uvoice_types.h:22
AUDIO_OUT_DEVICE_SPEAKER_AND_HEADPHONE
@ AUDIO_OUT_DEVICE_SPEAKER_AND_HEADPHONE
Definition:
uvoice_types.h:44
AUDIO_OUT_DEVICE_HEADPHONE
@ AUDIO_OUT_DEVICE_HEADPHONE
Definition:
uvoice_types.h:41
AUDIO_OUT_DEVICE_RECEIVER
@ AUDIO_OUT_DEVICE_RECEIVER
Definition:
uvoice_types.h:43
AUDIO_OUT_DEVICE_MAX
@ AUDIO_OUT_DEVICE_MAX
Definition:
uvoice_types.h:46
AUDIO_OUT_DEVICE_HEADSET
@ AUDIO_OUT_DEVICE_HEADSET
Definition:
uvoice_types.h:42
AUDIO_OUT_DEVICE_SPEAKER_AND_HEADSET
@ AUDIO_OUT_DEVICE_SPEAKER_AND_HEADSET
Definition:
uvoice_types.h:45
AUDIO_OUT_DEVICE_SPEAKER
@ AUDIO_OUT_DEVICE_SPEAKER
Definition:
uvoice_types.h:40
MEDIA_FMT_AAC
@ MEDIA_FMT_AAC
Definition:
uvoice_types.h:27
MEDIA_FMT_AMR
@ MEDIA_FMT_AMR
Definition:
uvoice_types.h:33
MEDIA_FMT_WMA
@ MEDIA_FMT_WMA
Definition:
uvoice_types.h:32
MEDIA_FMT_M4A
@ MEDIA_FMT_M4A
Definition:
uvoice_types.h:28
MEDIA_FMT_PCM
@ MEDIA_FMT_PCM
Definition:
uvoice_types.h:24
MEDIA_FMT_UNKNOWN
@ MEDIA_FMT_UNKNOWN
Definition:
uvoice_types.h:23
MEDIA_FMT_OPS
@ MEDIA_FMT_OPS
Definition:
uvoice_types.h:30
MEDIA_FMT_AMRWB
@ MEDIA_FMT_AMRWB
Definition:
uvoice_types.h:34
MEDIA_FMT_SPX
@ MEDIA_FMT_SPX
Definition:
uvoice_types.h:31
MEDIA_FMT_OGG
@ MEDIA_FMT_OGG
Definition:
uvoice_types.h:29
MEDIA_FMT_FLAC
@ MEDIA_FMT_FLAC
Definition:
uvoice_types.h:35
MEDIA_FMT_WAV
@ MEDIA_FMT_WAV
Definition:
uvoice_types.h:25
MEDIA_FMT_MP3
@ MEDIA_FMT_MP3
Definition:
uvoice_types.h:26
MEDIA_FMT_COUNT
@ MEDIA_FMT_COUNT
Definition:
uvoice_types.h:36
audio_extpa_info_t
Definition:
uvoice_types.h:49
audio_extpa_info_t::delay_ms
int delay_ms
Definition:
uvoice_types.h:53
audio_extpa_info_t::used
int used
Definition:
uvoice_types.h:50
audio_extpa_info_t::active_high
int active_high
Definition:
uvoice_types.h:51
audio_extpa_info_t::pin
int pin
Definition:
uvoice_types.h:52
cache_config_t
Definition:
uvoice_types.h:68
cache_config_t::mem_size
int mem_size
Definition:
uvoice_types.h:70
cache_config_t::place
int place
Definition:
uvoice_types.h:69
media_info_t
Definition:
uvoice_types.h:56
media_info_t::bitrate
int32_t bitrate
Definition:
uvoice_types.h:63
media_info_t::duration
int32_t duration
Definition:
uvoice_types.h:65
media_info_t::type
unsigned char type
Definition:
uvoice_types.h:62
media_info_t::valid
int valid
Definition:
uvoice_types.h:61
media_info_t::media_size
int32_t media_size
Definition:
uvoice_types.h:64