Provides access to hardware microphones. More...
Data Structures | |
struct | GNUNET_MICROPHONE_Handle |
A microphone is a device that can capture or otherwise produce audio data. More... | |
Typedefs | |
typedef void(* | GNUNET_MICROPHONE_RecordedDataCallback) (void *cls, size_t data_size, const void *data) |
Process recorded audio data. More... | |
typedef int(* | GNUNET_MICROPHONE_EnableCallback) (void *cls, GNUNET_MICROPHONE_RecordedDataCallback rdc, void *rdc_cls) |
Enable a microphone. More... | |
typedef void(* | GNUNET_MICROPHONE_DisableCallback) (void *cls) |
Function that disables a microphone. More... | |
typedef void(* | GNUNET_MICROPHONE_DestroyCallback) (void *cls) |
Function to destroy a microphone. More... | |
Functions | |
struct GNUNET_MICROPHONE_Handle * | GNUNET_MICROPHONE_create_from_hardware (const struct GNUNET_CONFIGURATION_Handle *cfg) |
Create a microphone that corresponds to the microphone hardware of our system. More... | |
void | GNUNET_MICROPHONE_destroy (struct GNUNET_MICROPHONE_Handle *microphone) |
Destroy a microphone. More... | |
Provides access to hardware microphones.
typedef void(* GNUNET_MICROPHONE_RecordedDataCallback) (void *cls, size_t data_size, const void *data) |
Process recorded audio data.
cls | clsoure |
data_size | number of bytes in data |
data | audio data to play |
Definition at line 57 of file gnunet_microphone_lib.h.
typedef int(* GNUNET_MICROPHONE_EnableCallback) (void *cls, GNUNET_MICROPHONE_RecordedDataCallback rdc, void *rdc_cls) |
Enable a microphone.
cls | clsoure |
rdc | function to call with recorded data |
rdc_cls | closure for dc |
Definition at line 69 of file gnunet_microphone_lib.h.
typedef void(* GNUNET_MICROPHONE_DisableCallback) (void *cls) |
Function that disables a microphone.
cls | clsoure |
Definition at line 79 of file gnunet_microphone_lib.h.
typedef void(* GNUNET_MICROPHONE_DestroyCallback) (void *cls) |
Function to destroy a microphone.
cls | clsoure |
Definition at line 86 of file gnunet_microphone_lib.h.
struct GNUNET_MICROPHONE_Handle * GNUNET_MICROPHONE_create_from_hardware | ( | const struct GNUNET_CONFIGURATION_Handle * | cfg | ) |
Create a microphone that corresponds to the microphone hardware of our system.
cfg | configuration to use |
Definition at line 172 of file microphone.c.
References cfg, GNUNET_MICROPHONE_Handle::cls, destroy(), GNUNET_MICROPHONE_Handle::destroy_microphone, disable(), GNUNET_MICROPHONE_Handle::disable_microphone, enable(), GNUNET_MICROPHONE_Handle::enable_microphone, GNUNET_new, mic, and microphone.
Referenced by run().
void GNUNET_MICROPHONE_destroy | ( | struct GNUNET_MICROPHONE_Handle * | microphone | ) |
Destroy a microphone.
microphone | microphone to destroy |
Definition at line 195 of file microphone.c.
References GNUNET_MICROPHONE_Handle::cls, GNUNET_MICROPHONE_Handle::destroy_microphone, GNUNET_free, and microphone.
Referenced by do_shutdown(), and do_stop_task().