SDK Reference · Method
setAudioOutput
Selects system-default output routing or requests the device speaker.
Declaration
public func setAudioOutput(_ output: STAudioOutput) -> STResultOverview
.deviceSpeaker enables speaker routing. .systemDefault returns output selection to the system-default route, which may be a receiver, Bluetooth device, or another active system route.
Returns .audioEnvironmentError if the audio-environment manager is unavailable.