Open drcryogen opened 6 years ago
Yes, this would be nice to have. I'm not sure how much timing control Bluetooth speakers have. I don't really use Bluetooth myself, so doing this is not on the top of my list.
I appreciate your honesty. :) Thanks for all the amazing work you've done on forked-daapd: it's a great piece of software.
I've done some digging regarding how much timing information is available in bluetooth. At least some higher end speakers appear to use such timing information. For example, Bose offers some speakers which have 'party mode' capability. According to their support (eg. this video see the first 1:30 or so), it appears that 2 separate bluetooth speakers can be paired with a device, and then using their app (ie software), can be kept in sync. To me this would imply the likely existence of sufficient timing information available to the source application.
Some other information from here
Every Bluetooth device has a free-running system clock which determines the timing of the frequency-hopping transceiver. In a piconet, the slave devices are synchronized to the master's system clock. The speakers will both be synchronized to the Bluetooth clock timing of the PC. Depending on the implementation of the Bluetooth chip, it may be possible for an application to derive a timer based on this clock. This clock can be used in conjunction with the RTP presentation timestamp in the packet to synchronize the playback. Therefore it is possible to use the piconet timing as a synchronization source between the two speakers.
In light of the above, it may be that only those bluetooth speakers with a sophisticated enough implementation would work in a mixed airplay/bluetooth environment.
This feature could possibly be rather handy, particularly due to the proliferation of permanent and semi-permanent bluetooth speakers such as 'smart' light bulbs, bathroom fans, shop lights or even medicine cabinets
Of late I've been experimenting with forked-daapd using bluetooth speakers. Following the instructions on the main page I got bluetooth output working through Pulse and can see my bluetooth speaker in the speaker list and play to it. My test speaker is a small (cheap) unit from a large box store whose name begins with W.
However, I seem to not be able to keep the bluetooth output in sync with the output from the other speakers (several shairport-sync installs and one ancient Airport Express). The bluetooth audio drifts out of sync over time and never comes back. Is it possible to keep the outputs of Airplay and bluetooth speakers synchronized or am I chasing a phantom?