https://github.com/masmu/pulseaudio-dlna
DLNA is some sort of standard, maybe that's what Sonos uses. I personally just use their phone app though.