Here are the steps I used to make a pair of JVC Bluetooth headphones with my Pigrrl 2.0 project.
Most of this was provided by Dawidekziaja I just changed it where I had to use a different method or added a step.
First run sudo update/ sudo upgrade
run sudo nano /etc/rc.local
Before the line that says exit, add a line and type sudo bluealsa &
ctrl+o
ctrl+x
reboot
run sudo bluetoothctl (connecting using the retropie bluetooth caused me some issues)
Then type:
power on
scan on
Find the mac address of your audio device, write it down for later.
trust xx:xx:xx:xx:xx:xx
pair xx:xx:xx:xx:xx:xx
connect xx:xx:xx:xx:xx:xx
Download asound.conf using this template https://www.dropbox.com/s/kotq703r6hso9r5/asound.conf
sudo nano /etc/asound.conf
I uploaded it to the Pi using FileZilla and used the "mv" command to place it in /etc - you can either change the file using nano or on a computer like I did
Replace xx:xx:xx:xx:xx:xx with your MAC address and A description of your device with a description of your device and paste into your terminal, replacing all contents that were already there.
ctrl+o
ctrl+x
I created .asoundrc by using nano. Sudo nano
defaults.bluealsa.interface "hci0"
defaults.bluealsa.device "XX:XX:XX:XX:XX:XX"
defaults.bluealsa.profile "a2dp"
". Replace xx:xx:xx:xx:xx:xx with your MAC"
ctrl-x
y
then type: ~/.asoundrc
reboot
Type sudo nano and create the following file
options snd_usb_audio index=0
options snd_bcm2835 index=1
options snd slots=snd-usb-audio,snd-bcm2835
save it as /etc/modprobe.d/alsa-base.conf
In retropie select the config and click bluetooth.
Now select "Connect Now to all registered devices."
DO NOT PAIR THE AUDIO DEVICE IN RETROPIE
Turn off the devices Wifi - I found that this made sound terrible for some reason. cvdrf
Go back to retropie and test audio. It should work! If it doesn't, but your device is connected, reboot your bluetooth audio device and try this step again.
Feel free to reply with any issues.