I've been trying to find one of these cables for a long time. I've never found one before for a price that I really liked (i.e. as cheap supplied from a reputable web site). The cables that I got worked perfectly with a Google Chromecast Audio and the Edifier speakers I got from Amazon (with an optical in).
Important: This cable won't make something that does not support optical out suddenly do it by magic. Ensure that you have a device that can do optical out otherwise it won't do anything. The cable has no analogue support for a 3.5mm audio jack only digital.