<FMLiveSwitchCocoaAudioSessionManagerObserver> Protocol Reference

Protocol for receiving AudioSessionManager quality events. More...

Instance Methods

(void) - audioSessionManagerDidEncounterEvent:detail:
 Called when a significant audio event occurs. More...
 

Detailed Description

Protocol for receiving AudioSessionManager quality events.

@discussion Implement this protocol and register via addObserver: to receive mid-call audio quality notifications (underruns, overruns, interruptions, etc.).

All callbacks are dispatched on the main queue.

Method Documentation

◆ audioSessionManagerDidEncounterEvent:detail:

- (void) audioSessionManagerDidEncounterEvent: (NSString *)  eventType
detail: (NSDictionary< NSString *, id > *_Nullable)  detail 
optional

Called when a significant audio event occurs.

Parameters
eventTypeOne of: "underrun", "overrun", "interruptionBegan", "interruptionEnded", "mediaServicesReset", "vpioLivenessFailed", "highJitter", "sinkFrameDrop", "deviceChange".
detailEvent-specific fields. Always contains "timestamp" (ISO 8601 string) and "sourceHadAudio" (bool — whether any source has produced non-silent audio since registration). Per-sink events also contain "sinkMediaId", "consecutiveCount", "totalCount", "deltaCount". Jitter events contain "smoothedJitterMs". Interruption events contain "sessionWasActive". "sinkFrameDrop" events contain "sinkMediaId", "consecutiveCount", "totalCount", "totalUnderruns" (use with consecutiveCount to distinguish jitter bursts from device stress). "deviceChange" events contain "reason" (string: e.g. "NewDeviceAvailable", "OldDeviceUnavailable", "CategoryChange"), "previousSampleRateHz", "newSampleRateHz", "sampleRateChanged" (bool).

@discussion Rate-limited for high-frequency events (underrun/overrun/jitter):

  • First occurrence: sent immediately.
  • Subsequent: sent at most once per 5 minutes per sink, with aggregated delta counts.
  • Session-level events (interruption, reset, VPIO failure, device change): always sent immediately.