public void AlignmentAlignsChildChannels()
        {
            GcAdpcmChannel[] channels = GenerateAudio.GenerateAdpcmChannelsEmpty(100, 2);
            GcAdpcmFormat    adpcm    = GcAdpcmFormat.GetBuilder(channels, 32000).WithAlignment(15).WithLoop(true, 10, 100).Build();

            Assert.All(adpcm.Channels, x => Assert.Equal(100, x.UnalignedSampleCount));
            Assert.All(adpcm.Channels, x => Assert.Equal(105, x.SampleCount));
        }
        public void ChannelsAreSetAfterCreation()
        {
            GcAdpcmChannel[] channels = GenerateAudio.GenerateAdpcmChannelsEmpty(100, 2);
            GcAdpcmFormat    adpcm    = GcAdpcmFormat.GetBuilder(channels, 32000).Build();

            Assert.Equal(channels[0].Adpcm, adpcm.Channels[0].Adpcm);
            Assert.Equal(channels[1].Adpcm, adpcm.Channels[1].Adpcm);
        }
        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));
        }
        public void TracksAreSetAfterCreation()
        {
            GcAdpcmChannel[] channels = GenerateAudio.GenerateAdpcmChannelsEmpty(100, 2);
            var tracks = new List <AudioTrack> {
                new AudioTrack(1, 0, 0), new AudioTrack(1, 1, 0)
            };
            GcAdpcmFormat adpcm = GcAdpcmFormat.GetBuilder(channels, 32000).WithTracks(tracks).Build();

            Assert.Equal(tracks, adpcm.Tracks);
        }