Main Content

Audio Capture Interface

Simulate capture of sample from audio stream on hardware

  • 库:
  • SoC Blockset / Peripherals

  • Audio Capture Interface block

Description

TheAudio Capture Interfaceblock simulates the behavior of an audio input device. The block outputs audio samples as a message to a connectedAudio Captureblock that simulates audio driver code and connects to your algorithm. The block can also emit an event that, when connected to aTask Managerblock, can trigger a task containing theAudio Captureblock.

Ports

Input

expand all

To provide a single audio channel, specify this data as anM-element audio data frame, whereMdefines the number of samples of audio data per frame. To provide multiple audio channels provided, specify data as anM-by-Cmatrix, whereCdefines the number of channels.

Dependencies

To enable this port, set theInputparameter toFrom input port.

Data Types:int8|int16|int32

Output

expand all

This port sends a message after a frame of audio samples is captured for all channels. This output connects to the input of theTask Managerblock to execute the associated event-driven task.

Dependencies

To enable this port, select theShow event portparameter.

Data Types:rteEvent

This port outputs data messages containing audio data to a connectedAudio Captureblock.

Data Types:SoCData

Parameters

expand all

Specify the source of the simulated audio data.

Specify the audio data as aCN-length vector representing the audio frames for all channels, whereNis the number of samples per frame andCis the number of audio channels. The samples for each channel are contiguous.

Specify the audio data as a timeseries object defined in the MATLAB®workspace.

Enter the sample time defining the rate at which to output the message containing audio data.

Select this parameter to enable an event port that, when connected to theTask Managerblock, can execute event-driven tasks.

Extended Capabilities

版本历史

Introduced in R2021a