示例#1
0
        public void GettingChannelsThrowsWhenOutOfBounds()
        {
            GcAdpcmFormat adpcm = GenerateAudio.GenerateAdpcmSineWave(100, 4, 48000);

            Exception ex = Record.Exception(() => adpcm.GetChannels(4, 0));

            Assert.IsType <ArgumentException>(ex);
        }
示例#2
0
        public void GettingSpecificChannels()
        {
            GcAdpcmFormat adpcm   = GenerateAudio.GenerateAdpcmSineWave(100, 4, 48000);
            GcAdpcmFormat partial = adpcm.GetChannels(2, 0, 2);

            Assert.Equal(100, partial.SampleCount);
            Assert.Equal(3, partial.ChannelCount);
            Assert.Equal(adpcm.Channels[2], partial.Channels[0], new GcAdpcmChannelComparer());
            Assert.Equal(adpcm.Channels[0], partial.Channels[1], new GcAdpcmChannelComparer());
            Assert.Equal(adpcm.Channels[2], partial.Channels[2], new GcAdpcmChannelComparer());
        }