Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PAPlayer/Audioengine tweaks for spotyxbmc #45

Merged
merged 2 commits into from
Jul 21, 2012
Merged

PAPlayer/Audioengine tweaks for spotyxbmc #45

merged 2 commits into from
Jul 21, 2012

Conversation

tompen-
Copy link

@tompen- tompen- commented Jul 21, 2012

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.

akezeke added a commit that referenced this pull request Jul 21, 2012
PAPlayer/Audioengine tweaks for spotyxbmc
@akezeke akezeke merged commit 00b8024 into akezeke:master Jul 21, 2012
@akezeke
Copy link
Owner

akezeke commented Jul 22, 2012

This solution did not fix the problem 100% it seems, most of the time it works to skip to next song and start another one when one is already playing but sometimes the same error occurs!

@tompen-
Copy link
Author

tompen- commented Jul 22, 2012

When developing the patch, I had the skip to next song working 100%, I tested lots of times and I am sure it worked. It must have been some change I did late after I did these tests. I will try to figure it out.

@tompen-
Copy link
Author

tompen- commented Jul 22, 2012

I could see the problem and made a fix, a new pull request have been created. I tested with a playlist of approx 200songs and now this works ok for me (on Windows).

@akezeke
Copy link
Owner

akezeke commented Jul 22, 2012

That fix seems to have fixed it! Great work once again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants