Replies: 2 comments 2 replies
-
Something I just found by going down the route of PulseAudio - it works, but there's a delay of about 8-10s between the device receiving audio from Shairport-Sync and it coming out of the Sonos. Since SS has no control for sync in the audio pipeline beyond itself (as I understand), I guess this becomes quite fragile when doing multiple speakers select in AP2. It makes video completely unuseable, but my main goal was music anyway. Even so, when using multiple airplay2 endpoints, each attached to individual speakers, the chance of them being out of sync seems high. Apparently when using ALSA with mkchromecast, the delay drops to 'maximum 4 seconds', so maybe less room for error, although my desired multi-room solution might not work quite as well as I'd hoped if everything beyond Shairepoint-Sync is out of sync |
Beta Was this translation helpful? Give feedback.
-
Thanks for the interesting discussion. TBH I don't know too much about Sonos or mkchromecast. I would agree that the whole setup would be fragile. If there was code to drive those old Sonos speakers directly and get latency information back from them, that would be the way to go. |
Beta Was this translation helpful? Give feedback.
-
Hey,
I've got a couple Sonos Play:1s kicking around - they're Sonos speakers that predate Sonos' support for AirPlay 2. The app is slow and cludgy, so I was interested in getting them to work with AirPlay 2. I was keen to go with AP2 specifically, because it supports multiple speakers, giving me multi-room.
In comes mkchromecast (https://github.com/muammar/mkchromecast). It supports sending a Linux device's system audio to either a chromecast or sonos device. It by default does this via PulseAudio, but also supports ALSA. The ALSA method (https://github.com/muammar/mkchromecast/wiki/ALSA) seems to be to create some kind of loobpack device that captures all the desktop audio, routing it back into mkchromecast.
My idea is that combining Shairport-Sync and mkchromecast should result in AirPlay 2-compatible older Sonos devices.
Problem is, I can't get mkchromecast to work with ALSA. It works fine out of the box with PulseAudio, but following the instructions for ALSA leaves me with 0 audio coming out of the system speakers or Sonos device. Similarly, I can get Shairport-Sync working no issues with ALSA, coming out of the system speakers, but couldn't really get it going with PulseAudio. Since Shairport-Sync's recommendation is ALSA, I wanted to go that route anyway.
So it seems like I can get either half of the puzzle sort of working, but can't combine it all together. The main roadblock I think being I can't seem to get mkchromecast working with ALSA.
Since mkchromecast's developer has stated he isn't really working on the project anymore, I'm appealing over here to see if anyone would be kind enough to help out. I'm reasonably comfortable with using Linux as a server platform, but working with its various audio tools is completely new to me since servers aren't usually playing music!
Been testing on Ubuntu Desktop 22.04 LTS. In the case of Shairport-Sync, I downloaded and built it manually instead of running it in Docker. I am comfortable with Docker, just thought it'd be faster and remove a layer of abstraction for initial testing.
Any help would be hugely appreciated.
Beta Was this translation helpful? Give feedback.
All reactions