audioplayer
Connection between audio output device and Raspberry Pi hardware
Description
This object represents a connection between the audio output devices, such as speakers or headphones, and a Raspberry Pi® hardware. You can interact with the audio device using the functions listed in Object Functions.
Note
To generate C/C++ code for this object and its associated functions, you must have an Embedded Coder® license.
Creation
Syntax
Description
creates an object that represents the connection to the audio output device, DeviceName, connected to the
Raspberry Pi hardware, audioPlayObj = audioplayer(mypi,DeviceName)mypi. The Raspberry Pi hardware is represented by a raspi object.
sets Properties using name-value
pairs. For example, audioPlayObj = audioplayback(mypi,DeviceName,Name,Value)audioPlayObj =
audioplayback(mypi,'plughw:1,0','SampleRate',44100) plays audio data at a
sample rate of 44100. You can specify multiple name-value pairs. Enclose each property
name in single quotes.
Input Arguments
Properties
Object Functions
play | Play audio from audio device connected to Raspberry Pi |
Examples
Extended Capabilities
Version History
Introduced in R2019b