Main Content

Audio Playback

Play audio on device speaker

Add-On Required: This feature requires the Simulink Support Package for Android Devices add-on.

  • Audio Playback block

Libraries:
Simulink Support Package for Android Devices / Audio & Video

Description

Use the Audio Playback block to play an audio sample on the device speaker.

Note

During simulation with no hardware connected, this block does nothing. For more information, see Block Produces Zeros or Does Nothing in Simulation.

Ports

Input

expand all

The block inputs the audio sample, specified as an N–by–2 numeric matrix. Here, N is the number of audio samples per frame, and the columns of the matrix represents the left and right audio channels, respectively.

Data Types: int16

Parameters

expand all

Specify the audio sampling frequency of the device speaker.

Version History

Introduced in R2014a