AIROC™ BTSDK v4.7 - Documentation | ||||
Bluetooth Audio Insert Application Programming Interface. More...
Data Structures | |
struct | wiced_bt_audio_insert_advanced_control_config_sco |
struct | wiced_bt_audio_insert_advanced_control_config_audio |
struct | wiced_bt_audio_insert_advanced_control_config |
struct | wiced_bt_audio_insert_data_sco |
struct | wiced_bt_audio_insert_data_audio |
struct | wiced_bt_audio_insert_data |
struct | wiced_bt_audio_insert_config |
Configuration data used to enable/start audio insertion. More... | |
struct | wiced_bt_audio_insert_event_data_req_t |
Data associated with WICED_BT_AUDIO_INSERT_EVT_DATA_REQ. More... | |
struct | wiced_bt_audio_insert_event_audio_info_t |
Data associated with LITE_HOST_LRAC_EVT_AUDIO_INFO. More... | |
union | wiced_bt_audio_insert_event_data_t |
Union of data associated with NREC events. More... | |
Modules | |
API Functions | |
API Functions module for Audio Insert. | |
Macros | |
#define | WICED_BT_AUDIO_INSERT_PCM_SAMPLE_NB_AUDIO 1024 |
Number of Max Required PCM Samples for Audio Insertion in Audio Stream. More... | |
#define | WICED_BT_AUDIO_INSERT_PCM_SAMPLE_NB_SCO 120 |
Number of PCM Samples for Audio Insertion in Voice Stream. More... | |
Typedefs | |
typedef void( | wiced_bt_audio_insert_source_data_exhausted_callback_t )(wiced_bt_audio_insert_type_t type) |
Callback when the insertion data is exhausted. More... | |
typedef void( | wiced_bt_audio_insert_source_data_pre_handler_t )(wiced_bt_sco_hook_event_data_t *p_data) |
typedef void( | wiced_bt_audio_insert_advanced_control_enable_t )(void) |
typedef void( | wiced_bt_audio_insert_advanced_control_disable_t )(void) |
typedef struct wiced_bt_audio_insert_advanced_control_config_sco | wiced_bt_audio_insert_advanced_control_config_sco_t |
typedef struct wiced_bt_audio_insert_advanced_control_config_audio | wiced_bt_audio_insert_advanced_control_config_audio_t |
typedef struct wiced_bt_audio_insert_advanced_control_config | wiced_bt_audio_insert_advanced_control_config_t |
typedef struct wiced_bt_audio_insert_data_sco | wiced_bt_audio_insert_data_sco_t |
typedef struct wiced_bt_audio_insert_data_audio | wiced_bt_audio_insert_data_audio_t |
typedef struct wiced_bt_audio_insert_data | wiced_bt_audio_insert_data_t |
typedef struct wiced_bt_audio_insert_config | wiced_bt_audio_insert_config_t |
Configuration data used to enable/start audio insertion. | |
typedef void( | wiced_bt_audio_insert_callback_t )(wiced_bt_audio_insert_event_t event, wiced_bt_audio_insert_event_data_t *p_data) |
Audio Insert Callback function type wiced_bt_audio_insert_callback_t. More... | |
Enumerations | |
enum | wiced_bt_audio_insert_type_t { WICED_BT_AUDIO_INSERT_TYPE_SCO_MIC, WICED_BT_AUDIO_INSERT_TYPE_SCO_SPK, WICED_BT_AUDIO_INSERT_TYPE_AUDIO } |
Audio Insert Type. More... | |
enum | wiced_bt_audio_insert_event_t { WICED_BT_AUDIO_INSERT_EVT_DATA_REQ = 3, WICED_BT_AUDIO_INSERT_EVT_AUDIO_INFO, WICED_BT_AUDIO_INSERT_EVT_SCO } |
Audio Insert Events. More... | |
Variables | |
wiced_bt_audio_insert_advanced_control_enable_t * | p_enable |
wiced_bt_audio_insert_advanced_control_disable_t * | p_disable |
wiced_bt_audio_insert_advanced_control_enable_t * | p_enable |
wiced_bt_audio_insert_advanced_control_disable_t * | p_disable |
wiced_bt_audio_insert_advanced_control_config_sco_t | sco |
wiced_bt_audio_insert_advanced_control_config_audio_t | audio |
int16_t * | p_source |
uint32_t | len |
wiced_bool_t | overwrite |
wiced_bool_t | loop |
uint8_t | volume_reduce_factor_insert |
uint8_t | volume_reduce_factor_original |
wiced_bt_audio_insert_source_data_exhausted_callback_t * | p_source_data_exhausted_callback |
wiced_bool_t | stop_insertion_when_source_exhausted |
wiced_bool_t | insert_data_after_target_seq_num |
uint32_t | expected_sco_time_seq_num |
wiced_bt_audio_insert_source_data_pre_handler_t * | p_source_data_pre_handler |
int16_t * | p_source |
uint32_t | len |
wiced_bool_t | overwrite |
wiced_bool_t | loop |
uint8_t | volume_reduce_factor_insert |
uint8_t | volume_reduce_factor_original |
wiced_bt_audio_insert_source_data_exhausted_callback_t * | p_source_data_exhausted_callback |
wiced_bool_t | stop_insertion_when_source_exhausted |
wiced_bool_t | multiple |
wiced_bt_audio_insert_data_sco_t sco | |
wiced_bt_audio_insert_data_audio_t audio | |
union { | |
wiced_bt_audio_insert_data_sco_t sco | |
wiced_bt_audio_insert_data_audio_t audio | |
}; | |
wiced_bt_audio_insert_type_t | type |
uint32_t * | p_sample_rate |
wiced_bt_audio_insert_data_t | insert_data |
int16_t * | p_data_in |
int16_t * | p_data_out |
uint16_t | bufferSize |
uint16_t | sample_rate |
uint16_t | nb_samples |
wiced_bt_audio_insert_event_data_req_t | data_req |
wiced_bt_audio_insert_event_audio_info_t | audio_info |
wiced_bt_audio_insert_event_audio_info_t | sco_info |
Bluetooth Audio Insert Application Programming Interface.
The Audio Insertion library provides API to allow the Wiced application to Play/Insert sound. If A2DP Stream is already active, the application can change the PCM samples going to the I2S interface. The application receives the PCM samples which 'should' be played. This allow to either Replace or Mix (e.g. add) the Inserted Audio. If A2DP Stream is not active, the I2S interface will be automatically started. Note that this API cannot be used if a SCO (e.g. HFP Call) is already ongoing. In this case the Audio must be inserted using the SCO Hook library.
#define WICED_BT_AUDIO_INSERT_PCM_SAMPLE_NB_AUDIO 1024 |
Number of Max Required PCM Samples for Audio Insertion in Audio Stream.
The user application shall provide number of samples * 2 * 2 bytes(each sample is 16-bit and stereo) The number of samples is based on I2S_AUD_INJECT_EVT_AUDIO_INFO information reported by i2s aud inject. The max value will be WICED_BT_AUDIO_INSERT_PCM_SAMPLE_NB_AUDIO samples(1024 * 2 * 2 bytes for AAC case)
#define WICED_BT_AUDIO_INSERT_PCM_SAMPLE_NB_SCO 120 |
Number of PCM Samples for Audio Insertion in Voice Stream.
The controller will ask the application to provide 120 samples data (120 * 16 bits) in every WICED_BT_SCO_HOOK_EVT_SPK_SAMPLES event.
typedef void( wiced_bt_audio_insert_callback_t)(wiced_bt_audio_insert_event_t event, wiced_bt_audio_insert_event_data_t *p_data) |
Audio Insert Callback function type wiced_bt_audio_insert_callback_t.
Audio Insert Event callback (registered with wiced_bt_audio_insert_init)
[in] | event | Audio Insert event received |
[in] | p_data | : Data (pointer on union of structure) associated with the event |
typedef void( wiced_bt_audio_insert_source_data_exhausted_callback_t)(wiced_bt_audio_insert_type_t type) |
Callback when the insertion data is exhausted.
[in] | type |
Audio Insert Events.
Audio Insert events received by the Audio Insert callback (see wiced_bt_audio_insert_callback_t)
Audio Insert Type.
Type of audio insertion