Example #1
0
        public void PcmIsNotSameAfterChangingAndRebuildingChannel()
        {
            GcAdpcmChannel channel  = GetBuilder().WithLoop(true, 10, 100).Build();
            GcAdpcmChannel channel2 = channel.GetCloneBuilder().WithLoopAlignment(15).Build();

            Assert.NotSame(channel.GetPcmAudio(), channel2.GetPcmAudio());
        }
Example #2
0
        public void PcmIsSameAfterRebuildingChannel()
        {
            GcAdpcmChannel channel  = GetBuilder().WithLoop(true, 10, 100).Build();
            GcAdpcmChannel channel2 = channel.GetCloneBuilder().Build();

            Assert.Same(channel.GetPcmAudio(), channel2.GetPcmAudio());
        }
Example #3
0
        public void PcmIsSameAfterChangingNonCriticalParametersAndRebuildingChannel()
        {
            GcAdpcmChannel channel  = GetBuilder().WithLoop(true, 10, 100).Build();
            GcAdpcmChannel channel2 = channel.GetCloneBuilder().WithLoop(true, 20, 100).WithSamplesPerSeekTableEntry(20).Build();

            Assert.Same(channel.GetPcmAudio(), channel2.GetPcmAudio());
        }
Example #4
0
        public void SeekTableIsSameAfterRebuilding()
        {
            GcAdpcmChannel channel  = GetBuilder().WithSamplesPerSeekTableEntry(10).Build();
            GcAdpcmChannel channel2 = channel.GetCloneBuilder().WithLoop(true, 10, 100).Build();

            Assert.Same(channel.GetSeekTable(), channel2.GetSeekTable());
        }
Example #5
0
        public void AdpcmIsSameAfterAligningAndRebuilding()
        {
            GcAdpcmChannel channel  = GetBuilder(100).WithLoop(true, 10, 100).WithLoopAlignment(15).Build();
            GcAdpcmChannel channel2 = channel.GetCloneBuilder().WithSamplesPerSeekTableEntry(10).Build();

            Assert.Same(channel.GetAdpcmAudio(), channel2.GetAdpcmAudio());
        }
Example #6
0
        public void AdpcmLengthIsCorrectAfterRealignment()
        {
            GcAdpcmChannel channel  = GetBuilder(100).WithLoop(true, 10, 100).WithLoopAlignment(15).Build();
            GcAdpcmChannel channel2 = channel.GetCloneBuilder().WithLoopAlignment(20).Build();

            Assert.Equal(GcAdpcmMath.SampleCountToByteCount(110), channel2.GetAdpcmAudio().Length);
        }
Example #7
0
        public void PcmLengthIsCorrectAfterAlignmentAndUnalignment()
        {
            GcAdpcmChannel channel  = GetBuilder(100).WithLoop(true, 10, 100).WithLoopAlignment(15).Build();
            GcAdpcmChannel channel2 = channel.GetCloneBuilder().WithLoopAlignment(0).Build();

            Assert.Equal(105, channel.GetPcmAudio().Length);
            Assert.Equal(100, channel2.GetPcmAudio().Length);
        }
Example #8
0
        public void AdpcmIsSameAfterAligningAndUnaligning()
        {
            GcAdpcmChannel channel  = GetBuilder(100).WithLoop(true, 10, 100).Build();
            GcAdpcmChannel channel2 = channel.GetCloneBuilder().WithLoopAlignment(15).Build();
            GcAdpcmChannel channel3 = channel2.GetCloneBuilder().WithLoopAlignment(0).Build();

            Assert.Same(channel.GetAdpcmAudio(), channel3.GetAdpcmAudio());
            Assert.NotSame(channel.GetAdpcmAudio(), channel2.GetAdpcmAudio());
        }