Inheritance: IAudioEngine
Exemplo n.º 1
0
        public void AttachDetatchSource()
        {
            var engine = new AudioEngine();

            engine.Attach (this.provider, this.source, new AudioEngineCaptureOptions());
            Assert.IsTrue (engine.Detach (this.source));
        }
Exemplo n.º 2
0
 public void InvalidBeginCapture()
 {
     var engine = new AudioEngine();
     engine.Attach (this.provider, this.source, new AudioEngineCaptureOptions());
     Assert.Throws<ArgumentNullException> (() => engine.BeginCapture (null, new ChannelInfo(1)));
     Assert.Throws<ArgumentNullException> (() => engine.BeginCapture (this.source, (ChannelInfo)null));
     Assert.Throws<ArgumentNullException> (() => engine.BeginCapture (this.source, (IEnumerable<IChannelInfo>)null));
     Assert.Throws<ArgumentNullException> (() => engine.BeginCapture (null, UserInfoTests.GetTestUser()));
     Assert.Throws<ArgumentNullException> (() => engine.BeginCapture (this.source, (IUserInfo)null));
     Assert.Throws<ArgumentNullException> (() => engine.BeginCapture (this.source, (IEnumerable<IUserInfo>)null));
 }
Exemplo n.º 3
0
        public void InvalidAttach()
        {
            var engine = new AudioEngine();

            Assert.Throws<ArgumentNullException> (() => engine.Attach (null, this.source, new AudioEngineCaptureOptions()));
            Assert.Throws<ArgumentNullException> (() => engine.Attach (this.provider, null, new AudioEngineCaptureOptions()));
            Assert.Throws<ArgumentNullException> (() => engine.Attach (this.provider, this.source, null));
        }
Exemplo n.º 4
0
 public void StartWithoutSender()
 {
     var engine = new AudioEngine();
     engine.AudioReceiver = receiver;
     engine.Context = context;
     Assert.Throws<InvalidOperationException> (engine.Start);
 }
Exemplo n.º 5
0
        public void Stop()
        {
            var engine = new AudioEngine();
            engine.AudioReceiver = receiver;
            engine.AudioSender = sender;
            engine.Context = context;
            engine.Start();

            engine.Stop();

            Assert.IsFalse (engine.IsRunning);
        }
Exemplo n.º 6
0
        public void StartRunning()
        {
            var engine = new AudioEngine();
            engine.AudioReceiver = receiver;
            engine.AudioSender = sender;
            engine.Context = context;

            engine.Start();
            Assert.DoesNotThrow (engine.Start);
        }
Exemplo n.º 7
0
        public void InvalidUpdateUserTargets()
        {
            var engine = new AudioEngine();

            Assert.Throws<ArgumentNullException> (() => engine.Update (null, new UserInfo[] {}));
            Assert.Throws<ArgumentNullException> (() => engine.Update (source, (IEnumerable<IUserInfo>)null));
            Assert.Throws<ArgumentException> (() => engine.Update (source, new UserInfo[] { }));
        }
Exemplo n.º 8
0
        public void InvalidUpdatePlayback()
        {
            var engine = new AudioEngine();

            Assert.Throws<ArgumentNullException> (() => engine.Update (null, new AudioEnginePlaybackOptions()));
            Assert.Throws<ArgumentNullException> (() => engine.Update (source, (AudioEngineCaptureOptions)null));
            Assert.Throws<ArgumentException> (() => engine.Update (source, new AudioEnginePlaybackOptions()));
        }
Exemplo n.º 9
0
 public void InvalidUnmute()
 {
     var engine = new AudioEngine();
     Assert.Throws<ArgumentNullException> (() => engine.Unmute ((IAudioPlaybackProvider)null));
     Assert.Throws<ArgumentNullException> (() => engine.Unmute ((IAudioCaptureProvider)null));
 }
Exemplo n.º 10
0
 public void InvalidDetatch()
 {
     var engine = new AudioEngine();
     Assert.Throws<ArgumentNullException> (() => engine.Detach ((IAudioCaptureProvider)null));
     Assert.Throws<ArgumentNullException> (() => engine.Detach ((AudioSource)null));
 }