SonixOutputRoute

The audio output route a player's audio is actually being rendered on.

This is the active route as reported by the OS for the player's own output track — not a list of what is attached. The distinction matters: with a wired headset and a Bluetooth headset both connected, an attached-device list says "Bluetooth is present" while only one of them is actually carrying the audio. Deciding a route-dependent correction from the attached list therefore applies it on the wrong route. Read it from SonixPlayer.outputRoute / SonixMixer.outputRoute instead of inferring it host-side.

Why the route is worth knowing

Output latency is route-dependent, and the only route that differs enough to need its own correction is Bluetooth (see SonixPlayer.bluetoothExtraCompensationMs and docs/android-bluetooth-latency.md). The enum is deliberately coarse: it names the classes of route that behave differently for timing, not every device type the platform can report.

Platform accuracy

  • Android: AudioTrack.getRoutedDevice() — authoritative for this track.

  • iOS: AVAudioSession.sharedInstance().currentRoute.outputs — the session's active route, so it is exact.

Entries

Link copied to clipboard

Built-in loudspeaker or earpiece. The route the chirp loopback calibration measures.

Link copied to clipboard

Wired headset or headphones.

Link copied to clipboard

A Bluetooth sink: A2DP, SCO, or an LE Audio headset/speaker.

Link copied to clipboard

USB audio: headset, DAC/interface, or accessory.

Link copied to clipboard

A route the platform reports but Sonix does not classify (HDMI, cast, aux, ...).

Link copied to clipboard

The route is not resolvable yet.

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Inherited properties

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.