Bluetooth audio problems on a MacBook
The best step to isolating your issue would be to collect some data about the bluetooth environment where you are using your mac. Radio waves come and go with other devices, new phones, degrading antennas and changes in bluetooth firmware.
The Bluetooth Explorer is the best tool I have found to troubleshoot bluetooth hardware and data. It's free as part of Xcode from the Mac App Store.
You can debug data issues, see the protocols that connected devices are using, and get to all manner of engineering data relating to bluetooth such as errors, relative signal strength indication (RSSI). It's hard to tell if this will help you, but it lets me know when a microwave or home phone was causing noise issues on several occasions when my hardware was otherwise working properly.
My bluetooth audio over AptX was choppy, too. This fixed it for me:
defaults write com.apple.BluetoothAudioAgent "Apple Bitpool Min (editable)" 53
Another great hint I found is to alt(option)-click the bluetooth icon on the top menu bar of os x: Then navigate to the bluetooth music device on that menu and it will show you the type of codec being used (atpX in my case).
Thank you bmike♦ for the hint to using Connection Quality Window of Bluetooth Explorer! Thanks to it, I was able to determine what's the best position for my bluetooth audio receiver[1]. Surprisingly enough, the best position was on one of it's narrow sides! The position that it is designed to be in doesn't actually give the best RSSI :P
[1] ProCaster Bluetooth Audio Receiver BT-02
I have also suffered 'popping' and crackling using a Bluetooth stereo headphones on a MacBook Air running Lion. The headphones work perfectly when paired with other devices such as my iPhone 4.
I have had substantial improvement by reducing microphone input sensitivity. Open the 'open sound preferences' submenu under your bluetooth devices, and reduce microphone sensitivity to zero.
Run all the related processes on a higher priority:
I made a script to do that: https://gist.github.com/redolent/61e5db9d9685689e21e7
#!/bin/bash
list="$(
sudo ps -A \
| grep -iE '([h]ear|[f]irefox|[b]lue|[c]oreaudiod)' \
| cut -c 1-90
)"
pids=$( cut -c 1-6 <<< "$list" )
echo sudo renice -5 $pids
sudo renice -5 $pids
Try this:
Disconnect the bt-keybord, the bt-trackpad, the bt-mouse and all the other bluetooth devices one by one while listening the bt-speakers.
(While doing this, in my case, I discovered that the bt keyboard is interfering, and when I disconnect it, I start hearing the bt speaker working fine.)Then, re-connect the bt devices one by one, and you may see that things continue to work fine on the bt-speakers.
I don't know exactly what happens in my case, but maybe, the bt-keyboard reallocate itself to another "free channel" or something that does not interfere with the already connected bt peripherals.
This solved the problem for me.
I suspect that also the wifi may cause interferences, so while trying to find the responsible of the issue, you may also try to disable the wifi devices while listeing the bt-speakers to identify the guilty device.