Пример #1
0
        private string FadeOutDescription(Track track, Track nextTrack)
        {
            if (track == null)
            {
                return("");
            }

            var standardEndLength = BpmHelper.GetFullEndLoopLengthAdjustedToMatchAnotherTrack(track, nextTrack);
            var looped            = track.EndLoopCount > 1;
            var powerDown         = track.PowerDownOnEnd;
            var description       = "Fade Out: ";

            if (powerDown)
            {
                description = "PowerDown";
            }
            else
            {
                description += GetFormattedSeconds(standardEndLength);
            }

            var hasExtendedMix = BassPlayer.HasExtendedMixAttributes(track, nextTrack);

            if (hasExtendedMix)
            {
                var extendedFadeType = BassPlayer.GetExtendedFadeType(track, nextTrack);
                if (extendedFadeType == ExtendedFadeType.Default)
                {
                    var extendedEndLength = BassPlayer.GetExtendedFadeOutLength(track, nextTrack);
                    description += " (" + GetFormattedSeconds(extendedEndLength) + "*)";
                }
                else
                {
                    description += " (" + extendedFadeType + "*)";
                }
            }

            if (looped)
            {
                description += " looped";
            }

            description += "  " + track.EndBpm.ToString("00.00") + "BPM";

            return(description);
        }