Headless A2DP Audio Streaming on Raspbian Stretch with a Raspberry Pi Zero W and a HiFiBerry DAC+ Zero
This gist will show how to setup Raspberry Pi OS Buster running on a Raspberry Pi Zero HW with a HiFiBerry DAC+ Zero, connected to a regular set of computer speakers for a DIY Streaming Bluetooth Speaker. You can use any device with a A2DP capability like a phone, a tablet or your laptop to stream audio. Towards the bottom, I added some bonus features like low latency optimization so audio played has minimal lag.
There are a million and one guides and gists out there but none of them actually does what I wanted to do "out of the box" - there are always bigger or smaller hacks involved. I wanted a turnkey solution that would not relay on any external scripts of extra code. It is up to date as of June 2021.