Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Showing with 8 additions and 6 deletions.
  1. +8 −6 xbmc/cores/paplayer/PAPlayer.cpp
View
14 xbmc/cores/paplayer/PAPlayer.cpp
@@ -289,10 +289,8 @@ void PAPlayer::UpdateCrossfadeTime(const CFileItem& file)
if (!file.IsSpotify())
m_upcomingCrossfadeMS = m_defaultCrossfadeMS = g_guiSettings.GetInt("musicplayer.crossfade") * 1000;
else
- {
CLog::Log(LOGDEBUG, "PAPlayer::UpdateCrossfadeTime: Spotify track detected, crossfade is disabled.");
- m_upcomingCrossfadeMS = m_defaultCrossfadeMS; // Spotify (spotyxbmc) can not handle crossfade
- }
+ m_upcomingCrossfadeMS = m_defaultCrossfadeMS; // Spotify (spotyxbmc) can not handle crossfade
if (m_upcomingCrossfadeMS)
{
@@ -339,10 +337,14 @@ bool PAPlayer::QueueNextFileEx(const CFileItem &file, bool fadeIn/* = true */)
#define TIME_TO_CACHE_NEXT_FILE 0000
#define FAST_XFADE_TIME 00
#define MAX_SKIP_XFADE_TIME 0000
- do //Make sure we only have one concurrent spotifyc stream
+ CSharedLock lock(m_streamsLock);
+ while (m_streams.size() > 0) //Make sure we only have one concurrent stream
{
- CThread::Sleep(5); //Always execute at least once to allow stream to close
- } while((m_streams.size() > 0) && (m_playerGUIData.m_codec == "spotify"));
+ lock.Leave();
+ Sleep(50);
+ CSharedLock lock(m_streamsLock);
+ }
+ lock.Leave();
}
StreamInfo *si = new StreamInfo();

No commit comments for this range

Something went wrong with that request. Please try again.