sudo apt-get install bluealsa
bluetoothctl
power on
agent on
scan on
pair XX:XX:XX:XX:XX
trust XX:XX:XX:XX:XX
connect XX:XX:XX:XX:XX
quit
aplay -D bluealsa:HCI=hci0,DEV=XX:XX:XX:XX:XX:XX,PROFILE=a2dp test.wav
SDL_AUDIODRIVER="alsa" AUDIODEV="bluealsa:HCI=hci0,DEV=C0:28:8D:6B:5A:F4,PROFILE=a2dp" ffplay -nodisp -vn -autoexit -i piano.wav
maybe??
sudo apt-get install pulseaudio pulseaudio-module-bluetooth
sudo usermod -G bluetooth -a pi
sudo shutdown -r now
Note: pulseaudio seems to slow down sound playback even through the 1.8" jack. So installing it may screw up audio / video sync. May need to remove and reboot to fix it.
list bluetooth devices:
sudo apt-get install bluez-tools
bt-device -l
offset of 1.15s seems better for BT, but not predictable
aptx is a BT audio codec that is low latency. The pi BT does not support aptx. You'd need a BT transmitter that supports aptx (maybe like this? https://www.amazon.com/Avantree-Bluetooth-Transmitter-Wireless-Headphones/dp/B01N5KKUR0 ) as well as speakers that support aptx