selectDevice

fun selectDevice(audioDevice: AudioDevice?)

Select a specific audio device. The selection is sticky: it overrides preferredDeviceList, persists across device hot-plug, and is restored automatically if the device temporarily disappears and later reconnects. Pass null to clear a sticky selection.

If you only need to change which device is preferred when several are available, set preferredDeviceList instead.