public double GetExtendedFadeOutLength(Track fromTrack, Track toTrack)
        {
            if (fromTrack == null)
            {
                return(0);
            }

            var attributes = GetExtendedMixAttributes(fromTrack, toTrack);

            if (attributes != null)
            {
                return(attributes.FadeLength);
            }
            var fadeOutLength = fromTrack.FullEndLoopLengthSeconds;

            if (fadeOutLength == 0)
            {
                fadeOutLength = BpmHelper.GetDefaultLoopLength(fromTrack.EndBpm);
            }

            if (toTrack != null)
            {
                fadeOutLength = BpmHelper.GetLengthAdjustedToMatchAnotherTrack(fromTrack, toTrack, fadeOutLength);
            }

            return(fadeOutLength);
        }