# (c) 2018 Marcelo Novaes
# License - MIT
# Enable AptX and AAC codecs on bluetooth connections on macOS
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true
sudo defaults write bluetoothaudiod "Enable AAC code" -bool true
# default is 128, you can change to higher
sudo defaults write bluetoothaudiod "AAC Bitrate" 128
# Reads set values, should return something like:
# {
# "Enable AAC code" = 1;
# "Enable AptX codec" = 1;
# "AAC Bitrate" = 128;
# }
sudo defaults read bluetoothaudiod
# You should be able to check it by connecting a compatible bluetooth device, playing some
# compatible music and then holding Option (Alt) and clicking on the Bluetooth menu bar icon.
# This should show you inside the connected device menu item Active Codec: AptX (or AAC)