Audio.Device¶
Name | Mandatory | Description | Default | Type |
---|---|---|---|---|
⬅️ Input |
Any input type is accepted. The input value will pass through unchanged. | Any |
||
Output ➡️ |
Outputs the input value, passed through unchanged. | Any |
||
InputChannels |
No | Sets the number of audio input channels for the device. | 0 |
Int |
OutputChannels |
No | Sets the number of audio output channels for the device. | 2 |
Int |
SampleRate |
No | Specifies the sample rate of the audio device, in Hertz (Hz). A value of 0 means the device's default sample rate will be used. | 0 |
Int |
BufferSize |
No | Specifies the size of the audio buffer used by the device. Note: This may be interpreted as a maximum value on some platforms. A value of 0 means the device's default buffer size will be used. | 0 |
Int |
InputDevice |
No | An optional name of the input device to use, otherwise the default input device will be used. | none |
None String |
OutputDevice |
No | An optional name of the input device to use, otherwise the default input device will be used. | none |
None String |
Experimental/unstable
This API is experimental and might produce unexpected results or crash.
This shard initializes an audio device in the mesh. This device sets up the audio context, manages input and output channels, and handles the audio processing loop which is necessary for processing and playing audio in the shards system. In essence, the Audio.Device provides the underlying audio system, and can be used with other shards like Audio.ReadFile and Audio.Channel to process and play audio.