RDK Documentation (Open Sourced RDK Components)
|
This file provides the data types and API(s) used by the audiocapturemgr.
Data Structures | |
class | acm_iarm_interface |
struct | acm_session_t |
class | acm_session_mgr |
class | audio_buffer |
class | q_mgr |
class | audio_capture_client |
struct | iarmbus_enable_payload_t |
struct | audio_properties_ifce_t |
struct | iarmbus_request_payload_t |
struct | iarmbus_notification_payload_t |
struct | iarmbus_delivery_props_t |
union | iarmbus_delivery_props_t.output |
struct | iarmbus_open_args |
struct | iarmbus_acm_arg_t |
union | iarmbus_acm_arg_t.details |
class | music_id_client |
class | socket_adaptor |
Typedefs | |
typedef int | session_id_t |
typedef void(* | request_complete_callback_t) (void *data, std::string &file, int result) |
typedef void(* | socket_adaptor_cb_t) (void *data) |
Enumerations | |
enum | iarmbus_output_type_t |
enum | iarmbus_events_t |
enum | iarmbus_audiocapturemgr_result_t |
enum | iarmbus_acm_format |
enum | iarmbus_acm_freq |
Functions | |
audio_buffer * | create_new_audio_buffer (const unsigned char *in_ptr, unsigned int in_size, unsigned int clip_length, unsigned int refcount) |
This API creates new audio buffer. More... | |
void | unref_audio_buffer (audio_buffer *ptr) |
This API is to release the audio buffer. More... | |
void | set_ref_audio_buffer (audio_buffer *ptr, unsigned int refcount) |
This API is used to update the buffer references. More... | |
void | audio_buffer_get_global_lock () |
Function to acquire lock. | |
void | audio_buffer_release_global_lock () |
Function to release lock. | |
void | free_audio_buffer (audio_buffer *ptr) |
Deletes the audio buffer. More... | |
class acm_iarm_interface |
Definition at line 26 of file acm_iarm_interface.h.
Public Member Functions | |
int | activate (music_id_client *client) |
This API initialize the message bus, registers event, RPC methods that can be used by other applications. More... | |
int | deactivate () |
This API disconnects application from the message bus, releases memory. More... | |
int | enable_capture_handler (void *arg) |
This API starts the audio capture. More... | |
int | get_sample_handler (void *arg) |
This API grabs the precaptured sample, if the requested data has precapture flag true. Otherwise, capture fresh sample. More... | |
void | set_filename_prefix (std::string &prefix) |
Function to add prefix to the audio filename. More... | |
Static Public Member Functions | |
static acm_iarm_interface * | get_instance () |
Private Attributes | |
bool | m_is_active |
bool | m_enable_audio_input |
music_id_client * | m_client |
int acm_iarm_interface::activate | ( | music_id_client * | client | ) |
This API initialize the message bus, registers event, RPC methods that can be used by other applications.
[in] | client | Indicates the id ofthe client device. |
Definition at line 94 of file acm_iarm_interface.cpp.
int acm_iarm_interface::deactivate | ( | ) |
This API disconnects application from the message bus, releases memory.
Also, unregisters the client from the application.
Definition at line 126 of file acm_iarm_interface.cpp.
int acm_iarm_interface::enable_capture_handler | ( | void * | arg | ) |
This API starts the audio capture.
If incoming duration is 0, turn off precapturing otherwise turn it back on and set duration.
[in] | arg | Payload data |
Definition at line 143 of file acm_iarm_interface.cpp.
int acm_iarm_interface::get_sample_handler | ( | void * | arg | ) |
This API grabs the precaptured sample, if the requested data has precapture flag true. Otherwise, capture fresh sample.
[in] | arg | Payload data |
Definition at line 179 of file acm_iarm_interface.cpp.
void acm_iarm_interface::set_filename_prefix | ( | std::string & | prefix | ) |
Function to add prefix to the audio filename.
[in] | prefix | Prefix to be added. |
Definition at line 223 of file acm_iarm_interface.cpp.
struct acm_session_t |
Definition at line 31 of file acm_session_mgr.h.
Data Fields | ||
---|---|---|
int | session_id | |
audio_capture_client * | client | |
q_mgr * | source | |
bool | enable | |
iarmbus_output_type_t | output_type |
class acm_session_mgr |
Definition at line 40 of file acm_session_mgr.h.
Public Member Functions | |
int | activate () |
This API initializes the message bus, registers event, RPC methods to be used by other applications. More... | |
int | deactivate () |
This API disconnects application from the message bus, releases memory. More... | |
int | get_sample_handler (void *arg) |
This API grabs the precaptured sample, if the requested data has precapture flag true. Otherwise, capture fresh sample. More... | |
int | generic_handler (void *arg) |
int | open_handler (void *arg) |
This API creates the music id session. It's also used by bluetooth manager as an audio source. More... | |
int | close_handler (void *arg) |
This API destroys the music id session, bluetooth manager session. More... | |
int | get_default_audio_props_handler (void *arg) |
This API returns default capture settings. More... | |
int | get_audio_props_handler (void *arg) |
This API returns the audio properties of a current session. More... | |
int | get_output_props_handler (void *arg) |
This API returns the output properties of a current session. More... | |
int | set_audio_props_handler (void *arg) |
This API is used to set the audio properties of a current session. More... | |
int | set_output_props_handler (void *arg) |
This API is to set precapture duration of a client device. More... | |
int | start_handler (void *arg) |
This API starts the client session. More... | |
int | stop_handler (void *arg) |
This API stops the current session. More... | |
void | set_filename_prefix (std::string &prefix) |
Function to add prefix to the audio filename. More... | |
Static Public Member Functions | |
static acm_session_mgr * | get_instance () |
Private Member Functions | |
q_mgr * | get_source (int source) |
void | lock () |
void | unlock () |
acm_session_t * | get_session (int session_id) |
Private Attributes | |
std::list< acm_session_t * > | m_sessions |
std::vector< q_mgr * > | m_sources |
pthread_mutex_t | m_mutex |
int | m_session_counter |
int acm_session_mgr::activate | ( | ) |
This API initializes the message bus, registers event, RPC methods to be used by other applications.
RPC methods like
Definition at line 152 of file acm_session_mgr.cpp.
int acm_session_mgr::deactivate | ( | ) |
This API disconnects application from the message bus, releases memory.
Also, unregisters the client from the application.
Definition at line 179 of file acm_session_mgr.cpp.
int acm_session_mgr::get_sample_handler | ( | void * | arg | ) |
This API grabs the precaptured sample, if the requested data has precapture flag true. Otherwise, capture fresh sample.
[in] | arg | Payload data |
Definition at line 684 of file acm_session_mgr.cpp.
int acm_session_mgr::open_handler | ( | void * | arg | ) |
This API creates the music id session. It's also used by bluetooth manager as an audio source.
Accepts only one instance of music id client per source type.
[in] | arg | Structure variable that holds the details like audio source, output types etc. |
Definition at line 205 of file acm_session_mgr.cpp.
int acm_session_mgr::close_handler | ( | void * | arg | ) |
This API destroys the music id session, bluetooth manager session.
[in] | arg | Structure variable that holds the details like audio source, output types etc. |
Definition at line 275 of file acm_session_mgr.cpp.
int acm_session_mgr::get_default_audio_props_handler | ( | void * | arg | ) |
This API returns default capture settings.
Settings like format, sampling frequency, FIFO size, threshold etc.
[in] | arg | Indicates the audio properties. |
Definition at line 383 of file acm_session_mgr.cpp.
int acm_session_mgr::get_audio_props_handler | ( | void * | arg | ) |
This API returns the audio properties of a current session.
[in] | arg | Indicates the audio properties. |
Definition at line 456 of file acm_session_mgr.cpp.
int acm_session_mgr::get_output_props_handler | ( | void * | arg | ) |
This API returns the output properties of a current session.
Depending on the output type socket or file output.
[in] | arg | Indicates the output properties. |
Definition at line 530 of file acm_session_mgr.cpp.
int acm_session_mgr::set_audio_props_handler | ( | void * | arg | ) |
This API is used to set the audio properties of a current session.
Properties like Format, Frequency, FIFO size, threshold, delay etc.
[in] | arg | Indicates the audio properties to set. |
Definition at line 572 of file acm_session_mgr.cpp.
int acm_session_mgr::set_output_props_handler | ( | void * | arg | ) |
This API is to set precapture duration of a client device.
[in] | arg | Indicates the output type. |
Definition at line 649 of file acm_session_mgr.cpp.
int acm_session_mgr::start_handler | ( | void * | arg | ) |
This API starts the client session.
[in] | arg | IARM bus arguments. |
Definition at line 333 of file acm_session_mgr.cpp.
int acm_session_mgr::stop_handler | ( | void * | arg | ) |
This API stops the current session.
[in] | arg | IARM bus arguments. |
Definition at line 358 of file acm_session_mgr.cpp.
void acm_session_mgr::set_filename_prefix | ( | std::string & | prefix | ) |
Function to add prefix to the audio filename.
[in] | prefix | Prefix to be added. |
Definition at line 751 of file acm_session_mgr.cpp.
class audio_buffer |
Definition at line 25 of file audio_buffer.h.
class q_mgr |
Definition at line 70 of file audio_capture_manager.h.
Public Member Functions | |
int | set_audio_properties (audiocapturemgr::audio_properties_t &in_properties) |
This API is used to set the audio properties to the client device. More... | |
void | get_audio_properties (audiocapturemgr::audio_properties_t &out_properties) |
This API returns the current audio properties of the device. More... | |
void | get_default_audio_properties (audiocapturemgr::audio_properties_t &out_properties) |
This function will return default RMF_AudioCapture_Settings settings. More... | |
unsigned int | get_data_rate () |
Returns data rate in bytes per second. More... | |
void | add_data (unsigned char *buf, unsigned int size) |
This API creates new audio buffer and pushes the data to the queue. More... | |
void | data_processor_thread () |
This API processes the audio buffers available in the queue. More... | |
int | register_client (audio_capture_client *client) |
This API registers the client. More... | |
int | unregister_client (audio_capture_client *client) |
Removes the client. More... | |
int | start () |
This function will start the Audio capture. More... | |
int | stop () |
This function will stop the audio capture. More... | |
Static Public Member Functions | |
static rmf_Error | data_callback (void *context, void *buf, unsigned int size) |
This function invokes an API for adding data to the audio buffer. More... | |
Private Member Functions | |
void | lock (pthread_mutex_t &mutex) |
void | unlock (pthread_mutex_t &mutex) |
void | notify_data_ready () |
void | swap_queues () |
void | flush_queue (std::vector< audio_buffer * > *q) |
void | flush_system () |
void | process_data () |
void | update_buffer_references () |
void | data_monitor () |
Private Attributes | |
std::vector< audio_buffer * > * | m_current_incoming_q |
std::vector< audio_buffer * > * | m_current_outgoing_q |
std::vector< audio_capture_client * > | m_clients |
audiocapturemgr::audio_properties_t | m_audio_properties |
unsigned int | m_bytes_per_second |
unsigned int | m_inflow_byte_counter |
unsigned int | m_num_clients |
pthread_mutex_t | m_q_mutex |
pthread_mutex_t | m_client_mutex |
sem_t | m_sem |
pthread_t | m_thread |
bool | m_processing_thread_alive |
bool | m_notify_new_data |
bool | m_started |
RMF_AudioCaptureHandle | m_device_handle |
unsigned int | m_max_queue_size |
std::thread | m_data_monitor_thread |
std::mutex | m_data_monitor_mutex |
std::condition_variable | m_data_monitor_cv |
bool | m_stop_data_monitor |
int q_mgr::set_audio_properties | ( | audiocapturemgr::audio_properties_t & | in_properties | ) |
This API is used to set the audio properties to the client device.
Properties like format,sampling_frequency,fifo_size,threshold,delay_compensation_ms. Checks if audio playback is started, restarted the client device after settings are applied.
[in] | in_properties | Structure which holds the audio properties. |
Definition at line 223 of file audio_capture_manager.cpp.
void q_mgr::get_audio_properties | ( | audiocapturemgr::audio_properties_t & | out_properties | ) |
This API returns the current audio properties of the device.
[out] | out_properties | Structure which holds the audio properties. |
Definition at line 270 of file audio_capture_manager.cpp.
void q_mgr::get_default_audio_properties | ( | audiocapturemgr::audio_properties_t & | out_properties | ) |
This function will return default RMF_AudioCapture_Settings settings.
Once AudioCaptureStart gets called with RMF_AudioCapture_Status argument this should still continue to return the default capture settings.
[out] | out_properties | Structure which holds the audio properties. |
dsERR_NONE | Indicates dsGetAudioPort API was successfully called using iarmbus call. |
dsERR_GENERAL | Indicates error due to general failure. |
Definition at line 275 of file audio_capture_manager.cpp.
unsigned int q_mgr::get_data_rate | ( | ) |
Returns data rate in bytes per second.
The data rate is a term to denote the transmission speed, or the number of bytes per second transferred. Datarate is calculated as bits_per_sample * sampling_rate * num_channels / 8;
Definition at line 285 of file audio_capture_manager.cpp.
void q_mgr::add_data | ( | unsigned char * | buf, |
unsigned int | size | ||
) |
This API creates new audio buffer and pushes the data to the queue.
[in] | buf | Data to be inserted into the queue. |
[in] | size | size of the buffer. |
Definition at line 290 of file audio_capture_manager.cpp.
void q_mgr::data_processor_thread | ( | ) |
This API processes the audio buffers available in the queue.
Definition at line 306 of file audio_capture_manager.cpp.
int q_mgr::register_client | ( | audio_capture_client * | client | ) |
This API registers the client.
Client is the consumer of audio data.
[in] | client | Client info for registering. |
Definition at line 390 of file audio_capture_manager.cpp.
int q_mgr::unregister_client | ( | audio_capture_client * | client | ) |
Removes the client.
[in] | client | Client info for registering. |
Definition at line 411 of file audio_capture_manager.cpp.
int q_mgr::start | ( | ) |
This function will start the Audio capture.
If Settings is not null, reconfigure the settings with the provided capture settings and starts the audio capture . If it is NULL, start with the default capture settings.
Definition at line 482 of file audio_capture_manager.cpp.
int q_mgr::stop | ( | ) |
This function will stop the audio capture.
Start can be called again after a Stop, as long as Close has not been called.
Definition at line 515 of file audio_capture_manager.cpp.
|
static |
This function invokes an API for adding data to the audio buffer.
[in] | context | data callback context |
[in] | buf | Data to be inserted into the queue. |
[in] | size | size of the buffer. |
Definition at line 43 of file audio_capture_manager.cpp.
class audio_capture_client |
Definition at line 219 of file audio_capture_manager.h.
Public Member Functions | |
virtual int | data_callback (audio_buffer *buf) |
audio_capture_client (q_mgr *manager) | |
unsigned int | get_priority () |
void | set_manager (q_mgr *manager) |
virtual int | set_audio_properties (audiocapturemgr::audio_properties_t &properties) |
virtual void | get_audio_properties (audiocapturemgr::audio_properties_t &properties) |
void | get_default_audio_properties (audiocapturemgr::audio_properties_t &properties) |
virtual void | notify_event (audio_capture_events_t event) |
virtual int | start () |
virtual int | stop () |
Protected Member Functions | |
void | release_buffer (audio_buffer *ptr) |
void | lock () |
void | unlock () |
Protected Attributes | |
q_mgr * | m_manager |
Private Attributes | |
unsigned int | m_priority |
pthread_mutex_t | m_mutex |
struct iarmbus_enable_payload_t |
Definition at line 107 of file audiocapturemgr_iarm.h.
Data Fields | ||
---|---|---|
unsigned int | result | |
float | max_duration |
struct audio_properties_ifce_t |
Definition at line 113 of file audiocapturemgr_iarm.h.
Data Fields | ||
---|---|---|
iarmbus_acm_format | format | |
iarmbus_acm_freq | sampling_frequency | |
size_t | fifo_size | |
size_t | threshold | |
unsigned int | delay_compensation_ms |
struct iarmbus_request_payload_t |
Definition at line 124 of file audiocapturemgr_iarm.h.
Data Fields | ||
---|---|---|
float | duration | |
bool | is_precapture |
struct iarmbus_notification_payload_t |
Definition at line 130 of file audiocapturemgr_iarm.h.
Data Fields | ||
---|---|---|
char | dataLocator[64] |
struct iarmbus_delivery_props_t |
Definition at line 136 of file audiocapturemgr_iarm.h.
Data Fields | ||
---|---|---|
union iarmbus_delivery_props_t | output |
union iarmbus_delivery_props_t.output |
Definition at line 138 of file audiocapturemgr_iarm.h.
struct iarmbus_open_args |
Definition at line 146 of file audiocapturemgr_iarm.h.
Data Fields | ||
---|---|---|
int | source | 0 for primary, increasing by 1 for each new source. |
iarmbus_output_type_t | output_type |
struct iarmbus_acm_arg_t |
Definition at line 152 of file audiocapturemgr_iarm.h.
Data Fields | ||
---|---|---|
session_id_t | session_id | |
int | result | |
union iarmbus_acm_arg_t | details |
union iarmbus_acm_arg_t.details |
Definition at line 156 of file audiocapturemgr_iarm.h.
Data Fields | ||
---|---|---|
iarmbus_open_args | arg_open | |
audio_properties_ifce_t | arg_audio_properties | |
iarmbus_request_payload_t | arg_sample_request | |
iarmbus_delivery_props_t | arg_output_props |
class music_id_client |
Definition at line 37 of file music_id.h.
Public Types | |
enum | preferred_delivery_method_t |
Public Member Functions | |
music_id_client (q_mgr *manager, preferred_delivery_method_t mode) | |
virtual int | data_callback (audio_buffer *buf) |
int | grab_precaptured_sample (const std::string &filename=nullptr) |
This API writes the precaptured sample to a file for file mode and in socket mode, sample is written to the unix socket connection established to the client. More... | |
request_id_t | grab_fresh_sample (unsigned int seconds, const std::string &filename=nullptr, request_complete_callback_t cb=nullptr, void *cb_data=nullptr) |
This API requests for new sample. More... | |
virtual int | set_audio_properties (audiocapturemgr::audio_properties_t &properties) |
Invokes an API for setting the audio specific properties of the audio capture client. More... | |
virtual void | get_audio_properties (audiocapturemgr::audio_properties_t &properties) |
Invokes an API for getting the audio specific properties of the audio capture client. More... | |
int | set_precapture_duration (unsigned int seconds) |
This API is used to set the precapture duration. More... | |
void | worker_thread () |
This function manages a queue of requests for music id samples. | |
unsigned int | get_max_supported_duration () |
This API returns maximum precaptured length. More... | |
unsigned int | enable_wav_header (bool isEnabled) |
This API is to enable/disable WAV header. More... | |
void | enable_output_conversion (bool isEnabled) |
This API enables audio downsampling without anti-aliasing. More... | |
void | send_clip_via_socket () |
This API writes the captured clip data to the socket. More... | |
const std::string & | get_sock_path () |
Public Member Functions inherited from audio_capture_client | |
audio_capture_client (q_mgr *manager) | |
unsigned int | get_priority () |
void | set_manager (q_mgr *manager) |
void | get_default_audio_properties (audiocapturemgr::audio_properties_t &properties) |
virtual void | notify_event (audio_capture_events_t event) |
virtual int | start () |
virtual int | stop () |
Private Types | |
typedef int | request_id_t |
Private Member Functions | |
void | trim_queue () |
int | write_default_file_header (std::ofstream &file) |
int | update_file_header_size (std::ofstream &file, unsigned int data_size) |
int | grab_last_n_seconds (const std::string &filename, unsigned int seconds) |
int | grab_last_n_seconds (unsigned int seconds) |
void | compute_queue_size () |
Private Attributes | |
std::list< audio_buffer * > | m_queue |
std::list< request_t * > | m_requests |
std::list< audio_converter_memory_sink * > | m_outbox |
std::thread | m_worker_thread |
bool | m_worker_thread_alive |
unsigned int | m_total_size |
unsigned int | m_precapture_duration_seconds |
unsigned int | m_precapture_size_bytes |
unsigned int | m_queue_upper_limit_bytes |
unsigned int | m_request_counter |
bool | m_enable_wav_header_output |
audiocapturemgr::audio_properties_t | m_output_properties |
bool | m_convert_output |
preferred_delivery_method_t | m_delivery_method |
socket_adaptor * | m_sock_adaptor |
const std::string | m_sock_path |
Additional Inherited Members | |
Protected Member Functions inherited from audio_capture_client | |
void | release_buffer (audio_buffer *ptr) |
void | lock () |
void | unlock () |
Protected Attributes inherited from audio_capture_client | |
q_mgr * | m_manager |
int music_id_client::grab_precaptured_sample | ( | const std::string & | filename = nullptr | ) |
This API writes the precaptured sample to a file for file mode and in socket mode, sample is written to the unix socket connection established to the client.
[in] | filename | File name, where precaptured output is written to in the case of file mode. |
Definition at line 185 of file music_id.cpp.
music_id_client::request_id_t music_id_client::grab_fresh_sample | ( | unsigned int | seconds, |
const std::string & | filename = nullptr , |
||
request_complete_callback_t | cb = nullptr , |
||
void * | cb_data = nullptr |
||
) |
This API requests for new sample.
[in] | seconds | length of the sample. |
[in] | filename | Output file name. |
[in] | cb | Callback function. |
[in] | cb_data | Callback data. |
Definition at line 285 of file music_id.cpp.
|
virtual |
Invokes an API for setting the audio specific properties of the audio capture client.
[in] | properties | Properties to set. |
Reimplemented from audio_capture_client.
Definition at line 115 of file music_id.cpp.
|
virtual |
Invokes an API for getting the audio specific properties of the audio capture client.
[out] | properties | Returns the audio properties like frequency,format of the device. |
Reimplemented from audio_capture_client.
Definition at line 127 of file music_id.cpp.
int music_id_client::set_precapture_duration | ( | unsigned int | seconds | ) |
This API is used to set the precapture duration.
It is in seconds.
[in] | seconds | Time in seconds. |
Definition at line 100 of file music_id.cpp.
unsigned int music_id_client::get_max_supported_duration | ( | ) |
This API returns maximum precaptured length.
Definition at line 490 of file music_id.cpp.
unsigned int music_id_client::enable_wav_header | ( | bool | isEnabled | ) |
This API is to enable/disable WAV header.
[in] | isEnabled | Boolean value indicates enabled/disabled. |
Definition at line 496 of file music_id.cpp.
|
inline |
This API enables audio downsampling without anti-aliasing.
[in] | isEnabled | Boolean value indicates enabled/disabled. |
Definition at line 162 of file music_id.h.
void music_id_client::send_clip_via_socket | ( | ) |
This API writes the captured clip data to the socket.
Also it terminates the current connection.
Definition at line 160 of file music_id.cpp.
class socket_adaptor |
Definition at line 33 of file socket_adaptor.h.
Public Types | |
enum | control_code_t |
Public Member Functions | |
int | start_listening (const std::string &path) |
This function makes the audiocapturemgr listen for incoming unix domain connections to the given path. More... | |
std::string & | get_path () |
This api returns the data path. More... | |
int | write_data (const char *buffer, const unsigned int size) |
This api invokes unix write() to write data to the socket. More... | |
void | terminate_current_connection () |
This api invokes close() to terminate the current connection. | |
unsigned int | get_active_connections () |
This api returns the number of active connections. More... | |
void | register_data_ready_callback (socket_adaptor_cb_t cb, void *data) |
Private Member Functions | |
void | process_new_connection () |
void | process_control_message (control_code_t message) |
void | stop_listening () |
void | lock () |
void | unlock () |
void | worker_thread () |
Private Attributes | |
std::string | m_path |
int | m_listen_fd |
int | m_write_fd |
int | m_control_pipe [2] |
unsigned int | m_num_connections |
std::thread | m_thread |
std::mutex | m_mutex |
socket_adaptor_cb_t | m_callback |
void * | m_callback_data |
int socket_adaptor::start_listening | ( | const std::string & | path | ) |
This function makes the audiocapturemgr listen for incoming unix domain connections to the given path.
[in] | path | binding path. |
Definition at line 93 of file socket_adaptor.cpp.
std::string & socket_adaptor::get_path | ( | ) |
This api returns the data path.
It is the path of unix domain server that ip-out clients must connect to in order to receive real-time audio data.
Definition at line 88 of file socket_adaptor.cpp.
int socket_adaptor::write_data | ( | const char * | buffer, |
const unsigned int | size | ||
) |
This api invokes unix write() to write data to the socket.
[in] | buffer | Data buffer. |
[in] | size | Size of the buffer |
Definition at line 64 of file socket_adaptor.cpp.
unsigned int socket_adaptor::get_active_connections | ( | ) |
This api returns the number of active connections.
Definition at line 319 of file socket_adaptor.cpp.
enum iarmbus_acm_freq |
Enumerator | |
---|---|
acmFreqe16000 | 16KHz |
acmFreqe24000 | 24kHz |
acmFreqe32000 | 32KHz |
acmFreqe44100 | 44.1KHz |
acmFreqe48000 | 48KHz |
Definition at line 97 of file audiocapturemgr_iarm.h.
audio_buffer* create_new_audio_buffer | ( | const unsigned char * | in_ptr, |
unsigned int | in_size, | ||
unsigned int | clip_length, | ||
unsigned int | refcount | ||
) |
This API creates new audio buffer.
It is used by the Data processor thread.
[in] | in_ptr | start_ptr |
[in] | in_size | input size @parampin] clip_length Duration of the audio data |
[in] | refcount | reference count of the buffer. |
Definition at line 45 of file audio_buffer.cpp.
void unref_audio_buffer | ( | audio_buffer * | ptr | ) |
This API is to release the audio buffer.
[in] | ptr | Indicates the starting address of buffer |
Definition at line 51 of file audio_buffer.cpp.
|
inline |
This API is used to update the buffer references.
[in] | ptr | Buffer pointer. |
[in] | refcount | Number of clients connected. |
Definition at line 62 of file audio_buffer.h.
void free_audio_buffer | ( | audio_buffer * | ptr | ) |
Deletes the audio buffer.
[in] | ptr | Indicates the starting address of buffer to be deleted. |
Definition at line 69 of file audio_buffer.cpp.