1. simon_linden
  2. viewer-rabbit

Commits

Jonathan Yap  committed 6153b77

STORM-1812 Store playing state from an additional place.

  • Participants
  • Parent commits 9c3d2ea
  • Branches default

Comments (0)

Files changed (1)

File indra/newview/llvieweraudio.cpp

View file
 		if (progress_view_visible  && !LLViewerAudio::getInstance()->getForcedTeleportFade())
 		{
 			// Even though the music was turned off it was starting up (with autoplay disabled) occasionally
-			// after a failed teleport or after an intra-parcel teleport.
-			if (gAudiop->getInternetStreamURL().empty())
-			{
-				LLViewerAudio::getInstance()->setWasPlaying(false);
-			}
-			else
-			{
-				LLViewerAudio::getInstance()->setWasPlaying(true);
-			}
+			// after a failed teleport or after an intra-parcel teleport.  Also, the music sometimes was not
+			// restarting after a successful intra-parcel teleport. Setting mWasPlaying fixes these issues.
+			LLViewerAudio::getInstance()->setWasPlaying(!gAudiop->getInternetStreamURL().empty());
 			LLViewerAudio::getInstance()->setForcedTeleportFade(true);
 			LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLStringUtil::null);
 			LLViewerAudio::getInstance()->setNextStreamURI(LLStringUtil::null);
 
 		if (!progress_view_visible && LLViewerAudio::getInstance()->getForcedTeleportFade())
 		{
+			LLViewerAudio::getInstance()->setWasPlaying(!gAudiop->getInternetStreamURL().empty());
 			LLViewerAudio::getInstance()->setForcedTeleportFade(false);
 		}