Devious Fish
Pianod2 News

Pianod2 News

State of Pianod

2017–12–06: I’ve been reconnoitering and reflecting as I gear up for the winter development season.

While the initial Spotify integration failed, there are a few open-source libraries. I’d like to take a look at those and determine if any are usable.

First, though, I intend to revisit some of the existing code and fix some of the implementation. I had minimal C++ coding experience before 2014, and frankly, some of pianod’s earlier code reflects this.

I’ve already broken up some bidirectional couplings that shouldn’t exist, replacing them with callbacks that can be registered. There’s more of that to do.

The design, coming from the original pianod, was built around a mostly-single-threaded model. The world is moving toward multithreaded models; it would make sense to move in this direction. Moving periodic() into its own thread, for example. That’ll need to be a slow, careful movement.

The source object lifecycle is weird, with checks to make sure all music objects are out of use before reaping. Meanwhile, a source goes into a quasi-dead state, where it’s waiting for its objects to be done, sort of like a zombie process. This seems like a good candidate for std::shared_ptr.

The music objects themselves use a custom-built reference counted solution. An advantage is the object is-a relationships that exist with this scheme; a disadvantage is that it’s not standard. It’s an area to be looked at and thought about.

The music library implementation also uses templates. While ThingieContainer provides type-safety, templates are ugly and generate more object code than needed for significantly similar types. It’s an area to be looked at for rework.

2018–01–06 additional: There was a recent request to have source access. Reworking SVN into a trunk, branch, releases arrangement is needed to support this sanely.

And all of this is dependent on a transition off macOS. I’m enamored with neither Linux nor Windows, although both seem to be on the “improving” trend, whereas macOS has been on the decline since Mavericks, and Apple’s laptops are unpalatably unserviceable (hence the switch). It’s enough to drive a girl to deliver packages for UPS and consider leaving tech behind.

State of Spotify Integration: Failed

2017–02–09: Spotify integration has failed. Spotify’s Web API does not provide a mechanism for playback (except 30-second samples). What is needed is the old LibSpotify, however, Spotify has “removed the LibSpotify binaries from our website in an effort to phase out the usage of this deprecated library. LibSpotify has been considered deprecated since 2015 and will be shut down in 2017…” They go on to suggest there are “upcoming embedded libraries for Windows, Mac OS X and Linux.”

If they follow through, perhaps in the future this can be retried. Unfortunately, they’ve been promising it for the web API for nigh 2 years, so that’s not a good sign.

I am looking to alternatives to keep myself busy. Based on a user request, I’m looking into adding capability for internet-based radio stations.

State of Gstreamer

2016–01–26: Releases r257–267 include significant hardening of the Gstreamer code, including fixes for an unchecked exception, improved error handling, addition of some mutex and not rapidly performing Gstreamer state changes (which deadlocks Gstreamer). See SVN logs for additional changes.