libspotify 0.0.4

Today, Spotify released their fourth version of their C library, libspotify 0.0.4. Since a project I’m involved in, namely Dogvibes, relies on this piece of code we just had to get this up and running as soon as possible. Some initial testing shows that this new version has gained some in performance. Searches are faster and a couple of hanging issues we had in previous versions seem to be gone. At least the most obvious ones.

But most notably, the library is now compiled not only for Linux, but also for Windows and OS X. This is huge! Imagine the impact this will have when mainstream apps such as Winamp start supporting Spotify URIs. The next natural step would be either compiling the library for the ARM architecture or, best of all, open-source it. But I believe we can’t hope to much for this to happen.

In addition to all this there are also some new features mentioned in the Spotify blog:

  • Functionality to star tracks
  • Radio searches
  • Manipulating playlists without having to add them to your playlist container
  • Support for fetching high bitrate versions of our streams
  • Callback if stream errors should occur
  • Callback whenever there is new userdata available

None of these is really something we craved for but they are nice additions to a library that apparently is getting quite stable. One thing we really lack, however, is thread-safety. At the moment, the library cannot be loaded by different threads simultaneously, making it rather difficult for us to extract album art or playlists from one place while playing a track in a GStreamer pipeline in another thread. So enabling support for multiple threads is something we’re really looking forward to, since at the moment this has to be solved by semi-ugly workarounds. Finally, keep up the good work Spotify! It nice to see that you’re still feeding us third part developers.