porcupine/demo/c/pvrecorder/include/pv_circular_buffer.h
Go to the documentation of this file.
1 /*
2  Copyright 2021 Picovoice Inc.
3 
4  You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
5  file accompanying this source.
6 
7  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
8  an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
9  specific language governing permissions and limitations under the License.
10 */
11 
12 #ifndef PV_CIRCULAR_BUFFER_H
13 #define PV_CIRCULAR_BUFFER_H
14 
15 #include <stdbool.h>
16 #include <stdint.h>
17 
22 
26 typedef enum {
32 
43  int32_t capacity,
44  int32_t element_size,
45  pv_circular_buffer_t **object);
46 
53 
63 int32_t pv_circular_buffer_read(pv_circular_buffer_t *object, void *buffer, int32_t length);
64 
75 
82 
90 
91 #endif //PV_CIRCULAR_BUFFER_H
PV_CIRCULAR_BUFFER_STATUS_WRITE_OVERFLOW
@ PV_CIRCULAR_BUFFER_STATUS_WRITE_OVERFLOW
Definition: porcupine/demo/c/pvrecorder/include/pv_circular_buffer.h:30
pv_circular_buffer_read
int32_t pv_circular_buffer_read(pv_circular_buffer_t *object, void *buffer, int32_t length)
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:68
pv_circular_buffer_status_t
pv_circular_buffer_status_t
Definition: porcupine/demo/c/pvrecorder/include/pv_circular_buffer.h:26
PV_CIRCULAR_BUFFER_STATUS_SUCCESS
@ PV_CIRCULAR_BUFFER_STATUS_SUCCESS
Definition: porcupine/demo/c/pvrecorder/include/pv_circular_buffer.h:27
PV_CIRCULAR_BUFFER_STATUS_INVALID_ARGUMENT
@ PV_CIRCULAR_BUFFER_STATUS_INVALID_ARGUMENT
Definition: porcupine/demo/c/pvrecorder/include/pv_circular_buffer.h:29
PV_CIRCULAR_BUFFER_STATUS_OUT_OF_MEMORY
@ PV_CIRCULAR_BUFFER_STATUS_OUT_OF_MEMORY
Definition: porcupine/demo/c/pvrecorder/include/pv_circular_buffer.h:28
pv_circular_buffer_delete
void pv_circular_buffer_delete(pv_circular_buffer_t *object)
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:61
pv_circular_buffer_init
pv_circular_buffer_status_t pv_circular_buffer_init(int32_t capacity, int32_t element_size, pv_circular_buffer_t **object)
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:26
pv_circular_buffer
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:17
pv_circular_buffer::element_size
int32_t element_size
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:21
pv_circular_buffer::buffer
void * buffer
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:18
pv_circular_buffer_reset
void pv_circular_buffer_reset(pv_circular_buffer_t *object)
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:152
pv_circular_buffer::capacity
int32_t capacity
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:19
pv_circular_buffer_status_to_string
const char * pv_circular_buffer_status_to_string(pv_circular_buffer_status_t status)
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:158
pv_circular_buffer_write
pv_circular_buffer_status_t pv_circular_buffer_write(pv_circular_buffer_t *object, const void *buffer, int32_t length)
Definition: porcupine/demo/c/pvrecorder/src/pv_circular_buffer.c:108


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:50