Audio Switch
class AudioSwitch
Content copied to clipboard
This class enables developers to enumerate available audio devices and select which device audio should be routed to. It is strongly recommended that instances of this class are created and accessed from a single application thread. Accessing an instance from multiple threads may cause synchronization problems.
Constructors
AudioSwitch
Link copied to clipboard
@JvmOverloads()
Content copied to clipboard
Constructs a new AudioSwitch instance.
Types
Functions
activate
Link copied to clipboard
fun activate()
Content copied to clipboard
Performs audio routing and unmuting on the selected device from AudioSwitch.selectDevice.
deactivate
Link copied to clipboard
fun deactivate()
Content copied to clipboard
Restores the audio state prior to calling AudioSwitch.activate and removes audio focus from the client application.
selectDevice
Link copied to clipboard
stop
Link copied to clipboard
fun stop()
Content copied to clipboard
Stops listening for audio device changes if AudioSwitch.start has already been invoked.
Properties
availableAudioDevices
Link copied to clipboard
Retrieves the current list of available AudioDevices.
loggingEnabled
Link copied to clipboard
selectedAudioDevice
Link copied to clipboard