1 /*
2  * Copyright (C) 2015-2020 Alibaba Group Holding Limited
3  */
4 
5 #ifndef __UVOICE_COMMON_H__
6 #define __UVOICE_COMMON_H__
7 
8 
9 typedef enum {
10     MEDIA_TYPE_UNKNOWN = 0,
11     MEDIA_TYPE_FILE,
12     MEDIA_TYPE_HTTP,
13     MEDIA_TYPE_FLASH,
14     MEDIA_TYPE_MEM,
15     MEDIA_TYPE_STREAM,
16     MEDIA_TYPE_COUNT,
17 } media_type_t;
18 
19 typedef struct {
20     int rate;
21     int channels;
22     int bits;
23     int frames;
24 } media_pcminfo_t;
25 
26 typedef struct {
27     uint8_t *buffer;
28     uint8_t *buffer_end;
29     uint8_t *rd_ptr;
30     uint8_t *wr_ptr;
31     int32_t free_size;
32     int32_t dirty_size;
33 } uvoice_ringbuff_t;
34 
35 
36 #endif /* __UVOICE_COMMON_H__ */
37