SDK Reference · Type
STAudioRouteInfo.STEndpoint
A public nested type describing one audio input or output endpoint in an STAudioRouteInfo snapshot.
Overview
STEndpoint represents a selected audio input or output device. It includes the device name, optional identifiers and transport details, and optional audio capabilities. It is nested within STAudioRouteInfo, so its full Swift name is STAudioRouteInfo.STEndpoint.
Declaration
public struct STAudioRouteInfo.STEndpoint: Sendable, Hashable, CustomStringConvertible {
public var name: String
public var uid: String?
public var kind: String?
public var manufacturer: String?
public var transportDescription: String?
public var isBluetooth: Bool?
public var nominalSampleRate: Double?
public var channels: UInt32?
// macOS only:
public var deviceID: UInt32?
public var transportType: UInt32?
}
Properties
| Property | Type | Description |
|---|---|---|
name |
String |
Human-readable endpoint name, such as Built-in Output or AirPods Pro. |
uid |
String? |
Optional platform device identifier. |
kind |
String? |
Optional port type or transport classification. |
manufacturer |
String? |
Device manufacturer, if known. |
transportDescription |
String? |
Human-readable transport description. |
isBluetooth |
Bool? |
Whether the endpoint uses Bluetooth, when known. |
nominalSampleRate |
Double? |
Optional nominal sample rate in Hz. |
channels |
UInt32? |
Optional channel count. |
deviceID |
UInt32? |
macOS only. CoreAudio device identifier. |
transportType |
UInt32? |
macOS only. CoreAudio transport type. |
Usage example
for endpoint in routeInfo.outputs {
print(endpoint.name)
if endpoint.isBluetooth == true {
print("Bluetooth output")
}
}