Main Content

Audio Playback

Play audio on the device speaker

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


Simulink Support Package for Android Devices / Audio & Video

  • Audio Playback block


Play a stereo audio stream from the audio output, such as the speaker, attached to the Android™ device.

The Audio Playback block accepts an N-by-2 array of int16 values. The left and right audio channels are assigned to the first and second columns of the output array, respectively. The size of the array, N, determines number of samples per frame.


Sample rate (Hz)

Specify the sample rate of the input device. The default value is 44100 Hz.

Version History

Introduced in R2014a