porcupine/demo/c/pvrecorder/include/pv_recorder.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_RECORDER_H
13 #define PV_RECORDER_H
14 
15 #include <stdbool.h>
16 #include <stdint.h>
17 
18 #define PV_API __attribute__((visibility ("default")))
19 
20 #define PV_RECORDER_DEFAULT_DEVICE_INDEX (-1)
21 
26 typedef struct pv_recorder pv_recorder_t;
27 
31 typedef enum {
42 
55  int32_t device_index,
56  int32_t frame_length,
57  int32_t buffer_size_msec,
58  bool log_overflow,
59  pv_recorder_t **object);
60 
67 
76 
85 
96 
104 
116 
124 PV_API void pv_recorder_free_device_list(int32_t count, char **devices);
125 
133 
139 PV_API const char *pv_recorder_version(void);
140 
141 #endif //PV_RECORDER_H
PV_RECORDER_STATUS_OUT_OF_MEMORY
@ PV_RECORDER_STATUS_OUT_OF_MEMORY
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:33
pv_recorder_delete
PV_API void pv_recorder_delete(pv_recorder_t *object)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:162
pv_recorder_init
PV_API pv_recorder_status_t pv_recorder_init(int32_t device_index, int32_t frame_length, int32_t buffer_size_msec, bool log_overflow, pv_recorder_t **object)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:51
pv_recorder::log_overflow
bool log_overflow
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:34
pv_recorder_free_device_list
PV_API void pv_recorder_free_device_list(int32_t count, char **devices)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:314
pv_recorder_read
PV_API pv_recorder_status_t pv_recorder_read(pv_recorder_t *object, int16_t *pcm)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:213
PV_RECORDER_STATUS_IO_ERROR
@ PV_RECORDER_STATUS_IO_ERROR
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:39
PV_RECORDER_STATUS_INVALID_ARGUMENT
@ PV_RECORDER_STATUS_INVALID_ARGUMENT
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:34
pv_recorder_stop
PV_API pv_recorder_status_t pv_recorder_stop(pv_recorder_t *object)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:192
pv_recorder_status_t
pv_recorder_status_t
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:31
pv_recorder_get_selected_device
const PV_API char * pv_recorder_get_selected_device(pv_recorder_t *object)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:249
count
size_t count
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/tests/test_common/ma_test_common.c:31
pv_recorder
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:28
pv_recorder_version
const PV_API char * pv_recorder_version(void)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:343
PV_RECORDER_STATUS_DEVICE_ALREADY_INITIALIZED
@ PV_RECORDER_STATUS_DEVICE_ALREADY_INITIALIZED
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:37
PV_API
#define PV_API
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:18
pv_recorder::frame_length
int32_t frame_length
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:32
PV_RECORDER_STATUS_DEVICE_NOT_INITIALIZED
@ PV_RECORDER_STATUS_DEVICE_NOT_INITIALIZED
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:38
pv_recorder_status_to_string
const PV_API char * pv_recorder_status_to_string(pv_recorder_status_t status)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:323
PV_RECORDER_STATUS_RUNTIME_ERROR
@ PV_RECORDER_STATUS_RUNTIME_ERROR
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:40
pv_recorder_start
PV_API pv_recorder_status_t pv_recorder_start(pv_recorder_t *object)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:172
PV_RECORDER_STATUS_BACKEND_ERROR
@ PV_RECORDER_STATUS_BACKEND_ERROR
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:36
PV_RECORDER_STATUS_SUCCESS
@ PV_RECORDER_STATUS_SUCCESS
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:32
pv_recorder_get_audio_devices
PV_API pv_recorder_status_t pv_recorder_get_audio_devices(int32_t *count, char ***devices)
Definition: porcupine/demo/c/pvrecorder/src/pv_recorder.c:256
PV_RECORDER_STATUS_INVALID_STATE
@ PV_RECORDER_STATUS_INVALID_STATE
Definition: porcupine/demo/c/pvrecorder/include/pv_recorder.h:35


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