PAPlayer/Audioengine tweaks for spotyxbmc #45
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes the following issues:
In xbmc.log
CAudioDecoder: Unable to Init Codec while loading file
and
QueueNextFileEx - Failed to create the decoder
The last 5 seconds of spotify songs was never played.
PAplayer attempted to cache next song, but spotify codec already does that internally.
Because spotify codec only allow one stream at any given time, the caching start aborted the currently played song.
Clicking skipnext to start the next song in a playlist did not work. This occured because PAplayer wanted to open a new stream before the other stream was closed.
When user had crossfade enabled, xbmc behaved strange.
Now PAplayer internally disables crossfade only for spotify songs so XBMC will not crossfade spotify songs even when user have this setting enabled. Other media will still crossfade. Crossfading does not work with spotify songs because spotify codec only allows one open stream at any given time.
If crossfading ever gets implemented in spotyxbmc, see issue 12, this pull request should be reverted.
#12
Basically, since the audioengine merge, PAplayer always mixes streams with a small overlap of 80ms (crossfading). Difference in PAplayer when user have enabled crossfade is the crossfading time gets much longer (seconds). So this pull request is needed because we hit issue 12 all the time.