is an object that represents a unique audio stream.
Details and Options
- AudioStream is a handle to an Audio object or a device to programmatically control playback or recording of audio signals.
- AudioStream[audio] returns an AudioStream object, without starting the playback. Use AudioPlay to start the playback.
- AudioStream[inputdev] returns an AudioStream object, without starting to record. Use AudioRecord to start the recording.
- The inputdev can be any available input audio device from $AudioInputDevices.
- The following options can be specified:
AudioChannelAssignment Inherited how to assign audio channels to outputs AudioLooping False whether to loop the playback AudioOutputDevice Inherited audio output device to use for playback Method Automatic method settings to use SoundVolume Inherited sound volume
- A list of available properties can be obtained using astream["Properties"].
- Some properties of the playback stream include:
"AudioChannelAssignment" how to assign audio channels to outputs "AudioLooping" whether to loop the playback "AudioOutputDevice" audio output device to use for playback "BufferSize" number of samples in each buffer "CurrentAudio" snippet of the current audio "ID" the stream ID "Position" position of the playback given as a time Quantity "SoundVolume" sound volume "Status" status of the stream
- Possible settings for "Status" include "Playing", "Recording", "Paused" or "Stopped".
- Additional properties are available for streams that are connected to an input device.
"AudioInputDevice" audio input device to use for recording "RecordedAudio" an Audio object containing the recording "StorageLocation" path to the file that will store the recorded audio
- It is possible to set values of properties with astream["prop"]=val.
Examplesopen all close all
Basic Examples (2)
Properties & Relations (2)
Possible Issues (2)
Introduced in 2017Updated in 2019