I have been doing some experiments with the Spotify library to learn it for use in spotd, and have been making some progress; I can now connect and log in to the Spotify server.

It took a little time to learn how to do it though, as libspotify uses separate threads and uses callbacks to my code in their thread contexts. This makes for some fun concurrency problems, and I basically had to copy the code for handling notifications and the main loop almost verbatim from the libspotify example code.

Also at the same time I am learning myself the new C++11 standard, and while most of the new standard library classes are somewhat based on the Boost-classes of the same name, there are some subtle differences. It wouldn't be such a problem if there was more resources on how to do things in C++11, but as it is brand new, there is almost no code and no examples on how to do things. I had to read the header-files to be able to figure out things, like how to wait on a condition variable.

But at least I'm making some progress, like I said before, and I think I can start with some design of the spotd libspotify classes soon. Unfortunately it seems I can not implement all of it using only C++11, as some things like boost::signal doesn't yet exist in the standard library.

Anyway... Onward to code!

No feedback yet


Form is loading...

March 2021
Mon Tue Wed Thu Fri Sat Sun
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
 << <   > >>
A place where it's possible to read the ramblings of two members of the Pileborg clan.

Search

  XML Feeds

Stack Overflow

Stack Overflow profile for Joachim Pileborg

Twitter

blogging software