Functions | |
ret_code_t | m_coms_ble_atvv_audio_send (uint8_t const *p_frame_buf, uint16_t frame_buf_len, uint16_t *p_bytes_transmitted, m_coms_data_process_status_t *p_status) |
Function for sending audio data. More... | |
ret_code_t | m_coms_ble_atvv_ctl_pkt_queue_process (void) |
Process control message queue. More... | |
ret_code_t | m_coms_ble_atvv_init (void) |
Function for initializing Android TV Voice (ATVV) functionality. More... | |
ret_code_t | m_coms_ble_atvv_start_search (uint16_t conn_handle) |
Function for indicating to a peer that a user has pressed the voice search button and that audio transfer should be started. More... | |
ret_code_t m_coms_ble_atvv_audio_send | ( | uint8_t const * | p_frame_buf, |
uint16_t | frame_buf_len, | ||
uint16_t * | p_bytes_transmitted, | ||
m_coms_data_process_status_t * | p_status | ||
) |
Function for sending audio data.
If audio frame length is longer than the MTU size or ATVV-permitted transmit size, the frame will be sent in multiple chunks. The p_bytes_transmitted
is set to the number of bytes of the frame sent. The ATVV frame header is automatically inserted.
[in] | p_frame_buf | Pointer to the frame buffer. |
[in] | frame_buf_len | Length of the frame buffer. |
[out] | p_bytes_transmitted | Pointer to memory where number of bytes transmitted will be stored. |
[out] | p_status | Pointer to memory where status information will be stored. |
NRF_SUCCESS | No errors occured. |
ret_code_t m_coms_ble_atvv_ctl_pkt_queue_process | ( | void | ) |
Process control message queue.
Control messages that are not sent immediately are put into a queue awaiting transmission. Call this function regularly to send control messages in the queue.
NRF_SUCCESS | Control message successfully sent. |
NRF_ERROR_NOT_FOUND | No messages left in the queue. |
NRF_ERROR_BUSY | Could not send message. |
ret_code_t m_coms_ble_atvv_init | ( | void | ) |
Function for initializing Android TV Voice (ATVV) functionality.
NRF_SUCCESS | or error code. |
ret_code_t m_coms_ble_atvv_start_search | ( | uint16_t | conn_handle | ) |
Function for indicating to a peer that a user has pressed the voice search button and that audio transfer should be started.
Once the voice search start message has been sent, a separate "open mic" command is expected from the peer. Audio streaming can be started once this message has been received (EVT_ATVV_STATE_MIC_OPEN).
[in] | conn_handle | Connection handle to use for the search message. |
NRF_SUCCESS | |
NRF_ERROR_BUSY | Already running a voice search. |
NRF_ERROR_INVALID_STATE | Peer(s) has not enabled the ATVV Service. |