View Single Post
mece's Avatar
Posts: 1,111 | Thanked: 1,985 times | Joined on Aug 2009 @ Åbo, Finland
#501
Originally Posted by aenbacka View Post
It is indeed really great that libspotify has been released for the arm architecture. From a technical point of view it would be no problem to switch to the official library as openspotify is api compatible; however, the current terns of use does not allow the library to be used on mobile internet devices (and N900 belongs to that category). Florian did post a question about this on the spotify forum, and they responded that they will consider a change to the usage terms. Hope that this clarifies the situation.
It does require some hacking it seems. libopenspotify is made after APIv4 specs and libspotify uses v7, and it doesn't support 96kbps. With some hacking I managed to compile qspot against libspotify but I didn't get it to actually work. If run as root it jammed at "connected to AP:" and if run as user it segfaulted. It was most likely my ugly hacks that caused the issues though. I had some warnings.

Aside from changeing #include <spotify/api.h> to #include <libspotify/api.h> and the .pro file, the main problems were the session bits that mostly return void in v7 where they kindly returned sp_error in v4. I just put whatever_error = SP_ERROR_OK;
sp_session_something()
instead of whatever_error = sp_session_something()

Also, turns out sp_session_init is now sp_session_create.
Code:
#if SPOTIFY_API_VERSION > 4
        sp_session_create(&m_config, &m_session);
#else
        sp_session_init(&m_config, &m_session);
#endif
worked for that.

But as I said, it didn't actually work. But it compiled. Now zzz.
__________________
Class .. : Meddler, Thread watcher, Developer, Helper
Humor .. : [********--] Alignment: Pacifist
Patience : [*****-----] Weapon(s): N900, N950, Metal music
Agro ... : [----------] Relic(s) : N95, NGage, Tamyia Wild One

Try Tweed Suit for your hardcore twittering needs
http://twitter.com/mece66
I like my coffee black, like my metal.