Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Two issues: distribution and synchronization.

First off, you must either have all clients have a full copy of the song, or have a remote site with the full song available for seeking-and-streaming. If you stream it, you have to be able to seek to the position in the song that everyone else is at so you can add more devices dynamically. You couldn't just stream whatever your phone is listening to (e.g. pandora) because it would add latency to the other clients' players and it would sound out of sync. The exception is if your player actually cached the sound data coming out of pandora, created a 10 second buffer, and started playing it "late", so the other clients would have enough lead time to buffer the song and start playing in sync.

Once you have resolved how to distribute the sound, you have to establish synchronization with all the clients. Ways to do that:

* Ship an ntp client with the app. Downside: network latency, firewalls.

* Synchronize nearby players by playing a loud tone four times, allowing clients to sync to the tone. Downside: latency of speed of sound, can only do once (otherwise someone has to play tones in the middle of your song to sync a new client)

* Listen to a track already playing, analyze own song's structure, find that point in the song, start from there. Downside: must already have decent portion (or all of) the song to seek to the correct positions. (Possible solution: implementation of rolling checksum/deltas?)

* Child clients buffer the song data from the parent client. Assuming the parent has slept N time before playing, communicate with the parent to discover what point the parent is streaming from now, download its 10 second buffer, and start playing at the correct point once synced with parent. Downside: must do all of that (network establishment, sync with parent, download buffer, start play) within 10 seconds or the buffer will be out of sync. Possibly do a 60 second buffer?

If your remote host just has all the song data, you could also just record a few seconds of whatever's playing around you, discover the song in your remote host's database, sync to the sound you're hearing, and seek, stream and play it. That would probably be the easiest thing, assuming your remote server had whatever song was playing. Possible to index local songs too.



It's much worse than that: if the soundwaves from all the different stereos aren't at least roughly phase-aligned, it's going to sound pretty bad. When working with installed soundsystems engineers typically apply sub-millisecond delays on each channel. Touring setups don't always do this stuff, but they're working with a few dozen speakers from the same manufacturer, not many assorted stereos.

Still, it would be a lot of fun to try. Best to just use FM radio.


Looks like someone got this working using various smartphones http://vimeo.com/71647538

FM radios though just might sound better.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: