AirPods Audio Sample Rate Issue on macOS Sequoia

I’m experiencing an unusual audio issue with AirPods on macOS Sequoia while developing VoIP applications like Zoom and FaceTime.

When AirPods are connected, the other party’s voice sometimes sounds unnaturally stretched (approximately twice as long).

This problem can be temporarily fixed by switching the sound output settings from AirPods to speakers and then back to AirPods.

From our analysis, the issue appears to be related to the sample rate provided by AudioObjectGetPropertyData.

Here’s what we’ve observed:

When the issue occurs, the AudioStreamBasicDescription.sampleRate for AirPods is reported as 48000. Under normal conditions, it’s reported as 24000. It seems like the system is mistakenly returning a sample rate that doesn’t match the AirPods’ actual settings, perhaps defaulting to a system speaker value. Once the output setting is toggled, the correct sampleRate (24000) is retrieved.

This discrepancy causes our application to transmit the audio stream at 48000, leading to the distorted playback.

Has anyone encountered a similar issue or knows how to resolve it?

After the sample rate was initially set to 48000, a notification indicating that the kAudioDevicePropertyStreamFormat had changed was sent, updating the sample rate back to 24000. However, this notification was not handled properly.

Hello @rtcdev, thank you for your post.

However, this notification was not handled properly.

Were you able to resolve the issue by handling the notification?

AirPods Audio Sample Rate Issue on macOS Sequoia
 
 
Q