Main Content

Audio Capture Interface

Simulate capture of sample from audio stream on hardware

Since R2021a

  • Audio Capture Interface block

Libraries:
SoC Blockset / Peripherals

Description

The Audio Capture Interface block simulates the behavior of an audio input device. The block outputs audio samples as a message to a connected Audio Capture block that simulates audio driver code and connects to your algorithm. The block can also emit an event that, when connected to a Task Manager block, can trigger a task containing the Audio Capture block.

Ports

Input

expand all

To provide a single audio channel, specify this data as an M-element audio data frame, where M defines the number of samples of audio data per frame. To provide multiple audio channels provided, specify data as an M-by-C matrix, where C defines the number of channels.

Dependencies

To enable this port, set the Input parameter to From 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 the Task Manager block to execute the associated event-driven task.

Dependencies

To enable this port, select the Show event port parameter.

Data Types: rteEvent

This port outputs data messages containing audio data to a connected Audio Capture block.

Data Types: SoCData

Parameters

expand all

Specify the source of the simulated audio data.

Specify the audio data as a CN-length vector representing the audio frames for all channels, where N is the number of samples per frame and C is 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 the Task Manager block, can execute event-driven tasks.

Extended Capabilities

Version History

Introduced in R2021a