Class SmartDeviceRerouter

java.lang.Object
de.pottgames.tuningfork.router.SmartDeviceRerouter
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable, AudioDeviceRerouter

public class SmartDeviceRerouter extends Object implements AudioDeviceRerouter
The SmartDeviceRerouter checks every 1.5 seconds (configurable) whether the connection to the audio device still exists and whether it is the optimal connection. If not, it tries to establish a connection with the following prioritization:
  • desired device
  • current default device
The router is able to restore a previously lost connection to the desired device when it becomes available again. When not connected to the desired device, the router will establish a connection to the default device and also keep track of it, so when the user selects a new default device in the OS, the router will do the same accordingly.