AudioPlay

AudioPlay[audio]

returns a new AudioStream object from audio and starts the playback.

AudioPlay[astream]

starts playing an AudioStream object astream.

Details and Options

  • AudioPlay can be used to perform programmatic audio playback.
  • In AudioPlay[audio], AudioOutputDevice and SoundVolume are inherited from audio.
  • AudioPlay will continually change the "Position" property of astream starting from the current position.
  • If astream is connected to an input device, AudioPlay plays the current signal being captured.
  • AudioPlay by default plays the entire stream until paused, stopped or finished.
  • The following options can be specified:
  • AudioLoopingInheritedwhether to loop the playback
    MaxDurationInfinitymaximum playback duration
  • AudioPlay continues to play until either MaxDuration is reached or the maximum number of loops is played.

Examples

open allclose all

Basic Examples  (1)

Create an AudioStream object and start the playback:

In[1]:=
Click for copyable input
Out[2]=

Scope  (2)

Options  (2)

Applications  (1)

See Also

Audio  AudioStop  AudioPause  AudioStream  EmitSound  AudioChannelAssignment

Introduced in 2017
(11.2)
| Updated in 2018
(11.3)