Reputation: 33
i'm working on creating an app that streams mp3s from a server. i'm using Matt Gallagher's AudioStreamer to accomplish this, but noticed that (especially on non-wifi) that it takes a few seconds to buffer and start streaming the audio. I'm looking to minimize this, à la Spotify, which is does it almost instantly.
What's the best way of doing this?
Upvotes: 1
Views: 717
Reputation: 31304
Spotify does a lot of clever stuff to ensure music streams instantly. I don't know how you're exactly implementing your streaming, but it's worth reading this article to get a handle on what exactly is going on when you 'stream' from Spotify:
http://pansentient.com/2011/04/spotify-technology-some-stats-and-how-spotify-works/
There's a lot of 'nifty' logic going on involving Spotify predicting which tracks you're likely to play in the future and pre-fetching them. Their mobile apps originally didn't take advantage of this to the same extent as the desktop, but I suspect as the apps have matured they've drip-fed some of the platform improvements down to mobile.
Upvotes: 3