Voice recorder functions.
More...
|
NUGU_API int | nugu_recorder_add (NuguRecorder *rec) |
| Add recorder object to managed list. More...
|
|
NUGU_API int | nugu_recorder_clear (NuguRecorder *rec) |
| Clear recording data. More...
|
|
NUGU_API NuguRecorder * | nugu_recorder_find (const char *name) |
| Find a recorder object by name in the managed list. More...
|
|
NUGU_API void | nugu_recorder_free (NuguRecorder *rec) |
| Destroy the recorder object. More...
|
|
NUGU_API void * | nugu_recorder_get_driver_data (NuguRecorder *rec) |
| Get custom data for driver. More...
|
|
NUGU_API int | nugu_recorder_get_frame (NuguRecorder *rec, char *data, int *size) |
| Get recorded data. More...
|
|
NUGU_API int | nugu_recorder_get_frame_count (NuguRecorder *rec) |
| Get frame count. More...
|
|
NUGU_API int | nugu_recorder_get_frame_size (NuguRecorder *rec, int *size, int *max) |
| Get frame size. More...
|
|
NUGU_API int | nugu_recorder_get_frame_timeout (NuguRecorder *rec, char *data, int *size, int timeout) |
| Get recorded data with timeout. More...
|
|
NUGU_API int | nugu_recorder_is_recording (NuguRecorder *rec) |
| Get the status of recording. More...
|
|
NUGU_API NuguRecorder * | nugu_recorder_new (const char *name, NuguRecorderDriver *driver) |
| Create new recorder object. More...
|
|
NUGU_API int | nugu_recorder_push_frame (NuguRecorder *rec, const char *data, int size) |
| Push recorded data. More...
|
|
NUGU_API int | nugu_recorder_remove (NuguRecorder *rec) |
| Remove recorder object from managed list. More...
|
|
NUGU_API int | nugu_recorder_set_driver_data (NuguRecorder *rec, void *data) |
| Set custom data for driver. More...
|
|
NUGU_API int | nugu_recorder_set_frame_size (NuguRecorder *rec, int size, int max) |
| Set frame size. More...
|
|
NUGU_API int | nugu_recorder_set_property (NuguRecorder *rec, NuguAudioProperty property) |
| Set property to recorder object. More...
|
|
NUGU_API int | nugu_recorder_start (NuguRecorder *rec) |
| Start recording. More...
|
|
NUGU_API int | nugu_recorder_stop (NuguRecorder *rec) |
| Stop recording. More...
|
|
Voice recorder functions.
The recorder manages the recorded audio data by pushing it to the ringbuffer.
◆ nugu_recorder_new()
Create new recorder object.
- Parameters
-
[in] | name | recorder name |
[in] | driver | recorder driver object |
- Returns
- recorder object
- See also
- nugu_recorder_free()
◆ nugu_recorder_free()
◆ nugu_recorder_add()
◆ nugu_recorder_remove()
Remove recorder object from managed list.
- Parameters
-
- Returns
- result
- Return values
-
◆ nugu_recorder_find()
NUGU_API NuguRecorder* nugu_recorder_find |
( |
const char * |
name | ) |
|
◆ nugu_recorder_set_property()
Set property to recorder object.
- Parameters
-
[in] | rec | recorder object |
[in] | property | property |
- Returns
- result
- Return values
-
◆ nugu_recorder_start()
◆ nugu_recorder_stop()
◆ nugu_recorder_clear()
Clear recording data.
- Parameters
-
- Returns
- result
- Return values
-
◆ nugu_recorder_is_recording()
NUGU_API int nugu_recorder_is_recording |
( |
NuguRecorder * |
rec | ) |
|
Get the status of recording.
- Parameters
-
- Returns
- result
- Return values
-
0 | idle |
1 | recording |
-1 | failure |
◆ nugu_recorder_set_driver_data()
NUGU_API int nugu_recorder_set_driver_data |
( |
NuguRecorder * |
rec, |
|
|
void * |
data |
|
) |
| |
Set custom data for driver.
- Parameters
-
[in] | rec | recorder object |
[in] | data | custom data managed by driver |
- Returns
- result
- Return values
-
- See also
- nugu_recorder_get_driver_data()
◆ nugu_recorder_get_driver_data()
NUGU_API void* nugu_recorder_get_driver_data |
( |
NuguRecorder * |
rec | ) |
|
◆ nugu_recorder_get_frame_size()
NUGU_API int nugu_recorder_get_frame_size |
( |
NuguRecorder * |
rec, |
|
|
int * |
size, |
|
|
int * |
max |
|
) |
| |
Get frame size.
- Parameters
-
[in] | rec | recorder object |
[out] | size | frame size |
[out] | max | max count |
- Returns
- result
- Return values
-
- See also
- nugu_recorder_set_frame_size()
◆ nugu_recorder_set_frame_size()
NUGU_API int nugu_recorder_set_frame_size |
( |
NuguRecorder * |
rec, |
|
|
int |
size, |
|
|
int |
max |
|
) |
| |
Set frame size.
- Parameters
-
[in] | rec | recorder object |
[in] | size | frame size |
[in] | max | max count |
- Returns
- result
- Return values
-
- See also
- nugu_recorder_get_frame_size()
◆ nugu_recorder_push_frame()
NUGU_API int nugu_recorder_push_frame |
( |
NuguRecorder * |
rec, |
|
|
const char * |
data, |
|
|
int |
size |
|
) |
| |
Push recorded data.
- Parameters
-
[in] | rec | recorder object |
[in] | data | recorded data |
[in] | size | size of recorded data |
- Returns
- result
- Return values
-
◆ nugu_recorder_get_frame()
NUGU_API int nugu_recorder_get_frame |
( |
NuguRecorder * |
rec, |
|
|
char * |
data, |
|
|
int * |
size |
|
) |
| |
Get recorded data.
- Parameters
-
[in] | rec | recorder object |
[out] | data | data |
[out] | size | size of data |
- Returns
- result
- Return values
-
◆ nugu_recorder_get_frame_timeout()
NUGU_API int nugu_recorder_get_frame_timeout |
( |
NuguRecorder * |
rec, |
|
|
char * |
data, |
|
|
int * |
size, |
|
|
int |
timeout |
|
) |
| |
Get recorded data with timeout.
- Parameters
-
[in] | rec | recorder object |
[out] | data | data |
[out] | size | size of data |
[in] | timeout | timeout milliseconds |
- Returns
- result
- Return values
-
◆ nugu_recorder_get_frame_count()
NUGU_API int nugu_recorder_get_frame_count |
( |
NuguRecorder * |
rec | ) |
|
Get frame count.
- Parameters
-
- Returns
- result
- Return values
-
>0 | success (frame count) |
-1 | failure |