1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
38
39
40
41
42
43
44
45
46
47
48
49
50
54
55
56
57
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
133
134
135
141
142
143
144
145
146
147
148
/* ... */
/* ... */
#ifndef BTSTACK_LC3_H
#define BTSTACK_LC3_H
#include <stdint.h>
#if defined __cplusplus
extern "C" {
#endif
typedef enum {
BTSTACK_LC3_FRAME_DURATION_10000US,
BTSTACK_LC3_FRAME_DURATION_7500US
...} btstack_lc3_frame_duration_t;
typedef struct {
/* ... */
uint8_t (*configure)(void * context, uint32_t sample_rate, btstack_lc3_frame_duration_t frame_duration, uint16_t octets_per_frame);
/* ... */
uint8_t (*decode_signed_16)(void * context, const uint8_t *bytes, uint8_t BFI,
int16_t* pcm_out, uint16_t stride, uint8_t * BEC_detect);
/* ... */
uint8_t (*decode_signed_24)(void * context, const uint8_t *bytes, uint8_t BFI,
int32_t* pcm_out, uint16_t stride, uint8_t * BEC_detect);
...} btstack_lc3_decoder_t;
typedef struct {
/* ... */
uint8_t (*configure)(void * context, uint32_t sample_rate, btstack_lc3_frame_duration_t frame_duration, uint16_t octets_per_frame);
/* ... */
uint8_t (*encode_signed_16)(void * context, const int16_t* pcm_in, uint16_t stride, uint8_t *bytes);
/* ... */
uint8_t (*encode_signed_24)(void * context, const int32_t* pcm_in, uint16_t stride, uint8_t *bytes);
...} btstack_lc3_encoder_t;
/* ... */
uint16_t btstack_lc3_frame_duration_in_us(btstack_lc3_frame_duration_t frame_duration);
/* ... */
uint16_t btstack_lc3_samples_per_frame(uint32_t sample_rate, btstack_lc3_frame_duration_t frame_duration);
#if defined __cplusplus
}extern "C" { ... }
#endif/* ... */
#endif