Adds functions to create buffers, calcalute buffer durations based on number of
samples and the sample rate and converting milliseconds to gst internal clock
time.
This also alows for the removal of all gst imports outside of mopidy.audio.
Likely cause of this issue is libspotify getting the intial seek to early. We
have not yet had time to dig beyond this point and develop has been broken for
to long due to this. As such this work aroundly simply ignores the first seek
to position zero outright, this avoiding what is likely a race condition in
libspotify.
Next step will be to create a minimal libspotify/pyspotify test case for this
to verify that assumption and hopefully figure out a correct fix. We also need
to look into if the intial seek can be avoided in gstreamer.
Adds a basic streaming backend simply handles streaming audio and nothing else.
I.e. no metadata beyond the URI we where given. #270 still needs to be solved
for actual metadata to make sense in this backend.
This fixes the issue where pausing playback would show the time of the last
timestamped buffer instead of the current time. We also make sure to reset the
time when we start a new track. This was done by overriding the play method on
the session manager as it is also used for pausing, resuming and stopping.
Ideally this should probably be reworked to avoid the gst import in
mopidy.backends.spotify.playback, but for now this should do.
Add a note saying that the purpose of the "aplay ... Front_Center.wav" line is merely to test whether the sound works or not, rather than to test its quality.
Anecdotally, I had very static-y sound from the aplay command, which prompted me to incorrectly believe that my sound would not work with Mopidy. As it turns out, the sound works fine using Mopidy or gstreamer. This note will hopefully keep other Mopidy users from thinking their sound is broken when it is not. (I ended up installing armhf version and trying to use despotify, which didn't work, before coming back to Mopidy.)
threading.Event's wait method returns None on python pre 2.7, which means all
searches would fail. This also corrects that fact that we weren't clearing the
connected threading event on disconnects. I did not add any tests for this at
this time as I just want to get the fix out.