AudioRouteChangeInfo
Describes an audio route change event, such as headphones being plugged in or disconnected, or a Bluetooth device connecting.
Route changes can affect audio playback and recording. For example, when headphones are unplugged, audio output typically switches to the built-in speaker, which may require the application to pause playback or adjust volume.
Platform Behavior
Android: On API 37 and later, Oboe reports
AudioStreamRoutingCallbackwhile a stream is open and its routed devices change without disconnecting the stream. reason is"RoutingChanged". previousRoute is the previous device id list ("unspecified"when there was none). Earlier Android versions disconnect the stream instead, and that path does not emit here.Apple: Route changes are reported via
AVAudioSession.routeChangeNotification.