Main Content

Audio Playback Interface

Simulate audio output device on a hardware board

Since R2021a

  • Audio Playback Interface block

Libraries:
SoC Blockset / Peripherals

Description

The Audio Playback Interface block simulates the behavior of an audio output device. The block receives audio samples as messages from a connected Audio Playback block that simulates audio driver code connected to your algorithm.

Ports

Input

expand all

This port receives data messages containing audio data from a connected Audio Playback block.

Data Types: SoCData

Output

expand all

When the block receives a single audio channel, the audio data frame is an M-element vector from a simulated hardware audio output. The Samples per frame parameter defines the number of samples, M, of audio data. When the block receives multiple audio channels, the audio data frame is an M-by-C matrix, where C is specified by the Number of channels parameter.

Dependencies

To enable this port, set the Output parameter to To output port.

Data Types: int8 | int16 | int32

Parameters

expand all

Specify if the block acts as a terminator, similar to the Terminator block, or produces data to an output port.

Specify the number of audio channels, C, sent to the audio device. This number must match the Number of channels parameter in the Audio Playback block.

Specify the number of samples per frame, M, of audio data.

Enter the sample time to be used by the timer-driven task subsystem when you clear the Enable event-based execution parameter.

Extended Capabilities

Version History

Introduced in R2021a