Ejemplo n.º 1
0
        public void ConstantTempoCalculatesCorrectly()
        {
            var timestamp = TimeConverter.CalculateBarBeatTickWithConstantTempo(1.5f, 120);
            var expected  = new BarBeatTick(0, 3, 0);

            Assert.Equal(expected, timestamp);
            timestamp = TimeConverter.CalculateBarBeatTickWithConstantTempo(7.5f, 60);
            expected  = new BarBeatTick(1, 3, 12000);
            Assert.Equal(expected, timestamp);
            timestamp = TimeConverter.CalculateBarBeatTickWithConstantTempo(7.75f, 60, 3);
            expected  = new BarBeatTick(2, 1, 18000);
            Assert.Equal(expected, timestamp);
        }