XCORE SDK
XCORE Software Development Kit
Functions
rtos_mic_array_driver_core

Functions

size_t rtos_mic_array_rx (rtos_mic_array_t *ctx, int32_t **sample_buf, size_t frame_count, unsigned timeout)
 

Detailed Description

The core functions for using an RTOS mic array driver instance after it has been initialized and started. These functions may be used by both the host and any client tiles that RPC has been enabled for.

Function Documentation

◆ rtos_mic_array_rx()

size_t rtos_mic_array_rx ( rtos_mic_array_t ctx,
int32_t **  sample_buf,
size_t  frame_count,
unsigned  timeout 
)
inline

Receives sample frames from the PDM mic array interface.

This function will block until new frames are available.

Parameters
ctxA pointer to the mic array driver instance to use.
sample_bufA buffer to copy the received sample frames into.
frame_countThe number of frames to receive from the buffer. This must be less than or equal to the size of the buffer specified to rtos_mic_array_start() if in RTOS_MIC_ARRAY_SAMPLE_CHANNEL mode. This must be equal to MIC_ARRAY_CONFIG_SAMPLES_PER_FRAME if in RTOS_MIC_ARRAY_CHANNEL_SAMPLE mode.
timeoutThe amount of time to wait before the requested number of frames becomes available.
Returns
The number of frames actually received into sample_buf.