openDevice

@NotNull
abstract fun openDevice(@NotNull format: @NotNull AudioFormat, @Nullable deviceName: @Nullable String): @NotNull AudioDevice

Opens a new audio device with the specified audio format and optional device name.

Return

A new audio device instance.

Parameters

format

The audio format to use for the device.

deviceName

The optional name of the specific audio device to open, or null to use the default device.

Throws

If there is an issue with opening an audio device.