audioplayer
Object for playing audio
Description
Use an audioplayer
object to play audio data. The object
contains properties that enable additional flexibility during playback. For example, you can
pause, resume, or define callbacks using the audioplayer
object
functions.
Creation
Syntax
Description
Input Arguments
Properties
Object Functions
get | Query property values for audioplayer object |
isplaying | Determine if playback is in progress |
pause | Pause playback or recording |
play | Play audio from audioplayer object |
playblocking | Play audio from audioplayer object, hold control until playback
completes |
resume | Resume playback or recording from paused state |
set | Set property values for audioplayer object |
stop | Stop playback or recording |
Examples
Limitations
These limitations apply when using
audioplayer
in MATLAB Online™ or MATLAB Web App Server™:You cannot create an
audioplayer
object from arecorder
object.You cannot change the sample rate of an existing
audioplayer
object.audioplayer
ignoresnBits
. Instead, it plays audio data using the default number of bits per sample of the output audio device.
More About
Tips
Audio playback in MATLAB Online and MATLAB Web App Server are supported in Google Chrome™.