public void AddAudioClipWhenNoSupportingGroupExists()
 {
     using (ITimeline timeline = new DefaultTimeline())
     {
         timeline.AddAudio("1sec.wav");
     }
 }
Пример #2
0
 public void AddAudioClipWhenNoSupportingTrackExists()
 {
     using (ITimeline timeline = new DefaultTimeline())
     {
         timeline.AddAudioGroup();
         timeline.AddAudio("..\\..\\1sec.wav");
     }
 }
        public void AddAudio()
        {
            // test all the overloads for AddAudio

            using (ITimeline timeline = new DefaultTimeline())
            {
                timeline.AddAudioGroup().AddTrack();

                IClip clip1 = timeline.AddAudio("1sec.wav");
                Assert.AreEqual(0, clip1.Offset);
                Assert.AreEqual(1, clip1.Duration);

                IClip clip2 = timeline.AddAudio("1sec.wav", 1);
                Assert.AreEqual(2, clip2.Offset);
                Assert.AreEqual(1, clip2.Duration);

                IClip clip3 = timeline.AddAudio("1sec.wav", 0, 0.5);
                Assert.AreEqual(3, clip3.Offset);
                Assert.AreEqual(0.5, clip3.Duration);

                IClip clip4 = timeline.AddAudio("1sec.wav", 0, 0.5, 1.0);
                Assert.AreEqual(3.5, clip4.Offset);
                Assert.AreEqual(0.5, clip4.Duration);
                Assert.AreEqual(0.5, clip4.MediaStart);

                IClip clip5 = timeline.AddAudio("1sec.wav", InsertPosition.Absolute, 6, 0, -1);
                Assert.AreEqual(6, clip5.Offset);
                Assert.AreEqual(1, clip5.Duration);

                IClip clip6 = timeline.AddAudio("myclip", "1sec.wav", InsertPosition.Absolute, 8, 0, 0.5);
                Assert.AreEqual(8, clip6.Offset);
                Assert.AreEqual(0, clip6.MediaStart);
                Assert.AreEqual(0.5, clip6.Duration);
                Assert.AreEqual("myclip", clip6.Name);
            }
        }
        public void AddAudio()
        {
            // test all the overloads for AddAudio

            using (ITimeline timeline = new DefaultTimeline())
            {
                timeline.AddAudioGroup().AddTrack();

                IClip clip1 = timeline.AddAudio("1sec.wav");
                Assert.AreEqual(0, clip1.Offset);
                Assert.AreEqual(1, clip1.Duration);

                IClip clip2 = timeline.AddAudio("1sec.wav", 1);
                Assert.AreEqual(2, clip2.Offset);
                Assert.AreEqual(1, clip2.Duration);

                IClip clip3 = timeline.AddAudio("1sec.wav", 0, 0.5);
                Assert.AreEqual(3, clip3.Offset);
                Assert.AreEqual(0.5, clip3.Duration);

                IClip clip4 = timeline.AddAudio("1sec.wav", 0, 0.5, 1.0);
                Assert.AreEqual(3.5, clip4.Offset);
                Assert.AreEqual(0.5, clip4.Duration);
                Assert.AreEqual(0.5, clip4.MediaStart);

                IClip clip5 = timeline.AddAudio("1sec.wav", InsertPosition.Absolute, 6, 0, -1);
                Assert.AreEqual(6, clip5.Offset);
                Assert.AreEqual(1, clip5.Duration);

                IClip clip6 = timeline.AddAudio("myclip", "1sec.wav", InsertPosition.Absolute, 8, 0, 0.5);
                Assert.AreEqual(8, clip6.Offset);
                Assert.AreEqual(0, clip6.MediaStart);
                Assert.AreEqual(0.5, clip6.Duration);
                Assert.AreEqual("myclip", clip6.Name);
            }
        }
 public void AddAudioClipWhenNoSupportingTrackExists()
 {
     using (ITimeline timeline = new DefaultTimeline())
     {
         timeline.AddAudioGroup();
         timeline.AddAudio("1sec.wav");
     }
 }