Example #1
0
        public void PcmIsSetWhenLoopPointsNeedAlignment()
        {
            //A new pcm array is generated if it doesn't exist, so check that the array returned
            //is the same when calling multiple times
            GcAdpcmChannel channel = GetBuilder().WithLoop(true, 20, 40).WithLoopAlignment(15).WithLoopContext(20, 0, 0, 0).Build();

            Assert.Same(channel.GetPcmAudio(), channel.GetPcmAudio());
        }
Example #2
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 #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 PcmIsSameAfterRebuildingChannel()
        {
            GcAdpcmChannel channel  = GetBuilder().WithLoop(true, 10, 100).Build();
            GcAdpcmChannel channel2 = channel.GetCloneBuilder().Build();

            Assert.Same(channel.GetPcmAudio(), channel2.GetPcmAudio());
        }
Example #5
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 #6
0
        public void PcmLengthIsCorrectAfterBuilding()
        {
            GcAdpcmChannel channel = GetBuilder(100).WithLoop(true, 10, 100).Build();

            Assert.Equal(100, channel.GetPcmAudio().Length);
        }
Example #7
0
        public void PcmIsNotSetWhenSeekTableAndLoopContextNotNeeded()
        {
            GcAdpcmChannel channel = GetBuilder().WithLoop(true, 20, 40).WithLoopContext(20, 0, 0, 0).Build();

            Assert.NotSame(channel.GetPcmAudio(), channel.GetPcmAudio());
        }