Exemplo n.º 1
0
        public void CloningAndModifyingDoesNotChangeFirstFormat()
        {
            GcAdpcmChannel[] channels = GenerateAudio.GenerateAdpcmChannelsEmpty(100, 2);
            GcAdpcmFormat    adpcm    = GcAdpcmFormat.GetBuilder(channels, 32000).WithAlignment(15).WithLoop(true, 10, 100).Build();
            GcAdpcmFormat    unused   = adpcm.GetCloneBuilder().WithAlignment(7).Build();

            Assert.All(adpcm.Channels, x => Assert.Equal(100, x.UnalignedSampleCount));
            Assert.All(adpcm.Channels, x => Assert.Equal(105, x.SampleCount));
        }
Exemplo n.º 2
0
        public void ReAlignmentAlignsChildChannels()
        {
            GcAdpcmChannel[] channels = GenerateAudio.GenerateAdpcmChannelsEmpty(100, 2);
            GcAdpcmFormat    adpcm    = GcAdpcmFormat.GetBuilder(channels, 32000).WithAlignment(15).WithLoop(true, 10, 100).Build();
            GcAdpcmFormat    adpcm2   = adpcm.GetCloneBuilder().WithAlignment(7).Build();

            Assert.All(adpcm2.Channels, x => Assert.Equal(100, x.UnalignedSampleCount));
            Assert.All(adpcm2.Channels, x => Assert.Equal(104, x.SampleCount));
        }