The Bluetooth codec used by your earphones has a significant impact on the sound quality. Unfortunately, macOS sometimes uses the sub-standard SBC codec instead of the aptX or AAC top codecs. Here's how to force macOS to use one of these instead.
What is a Bluetooth codec?
The word "codec" is the abbreviation for "coder-decoder", which is precisely what a codec does. In this case, the codec is used to compress the audio file at one end (code) and decompress it at the other end (decoding). This allows the file to be transmitted quickly. Some codecs compress audio better than others without reducing its quality. That's why it's essential to choose the right one.
SBC is the default codec sometimes used by macOS, while aptX and AAC offer better sound quality. The three codecs compress the audio before sending it to your headphones, but aptX and AAC do it without dramatic impact on the overall audio quality. SBC has been designed to be efficient and provide compatibility rather than to provide the best possible sound quality. Latency is also a problem with SBC, and the audio lag is noticeable when you watch video content. Neither aptX nor AAC exhibit this behavior.
If you want to know more about how aptX and AAC work, we have a good primer on the subject.
In short, aptX promises "CD-like" sound quality, which SBC can not offer. Similarly, AAC's improved compression algorithms provide better sound quality, despite a lower bit rate of 250 Kbps than SBC's 328 Kbps. The aptX codec, however, has the best performance at 352 Kbps.
Unfortunately, not all Bluetooth headsets support aptX or AAC, although most newer models do. If you force your Mac to use either codec, but your headset does not support it, do not worry – it will automatically switch to SBC.
How to check which codec is used
To see which codec is used, connect your Bluetooth headset to your Mac and play audio. Hold down the Option key and click on the "Bluetooth" icon in the menu bar.
Highlight your earphones and note the active codec.
This is the codec currently used. You are fine if it is aptX or AAC; otherwise, read on.
How to force aptX or AAC
Download Additional tools for Xcode from the Apple Developer site. To do this, you will need to create a free Apple Developer Account. Once downloaded, double-click the DMG file "Additional Tools" to mount it.
Double-click on "Additional Tools" on your desktop.
Double click on the "Hardware" folder.
Drag "Bluetooth Explorer.app" into your Applications folder.
Double-click on the "Bluetooth Explorer" application, then click "Tools> Audio Options" in the menu bar.
Check the boxes "Force use of aptX" and "Activate AAC". Make sure the "Disable AAC" and "Disable aptX" checkboxes are unchecked. (Yes, for some reason, the application will allow you to check the "Enable" and "Disable" checkboxes.)
Click the "Close" button to save the changes.
Disconnect and reconnect your earphones, then confirm that they are now using the aptX or AAC codecs described previously. If they are, you should notice an improvement in the sound quality. If not, it might be time to offer some new helmet.