public async Task GetBytesFromDataAvailble() { TestAgentAudioInputProvider testAgent = await TestAgentAudioInputProvider.InitializeFromNowAsync(); testAgent.DebugAudioCaptureFilesEnabled = true; await testAgent.StartWithInitialSkipAsync(TimeSpan.Zero); Assert.IsNotNull(testAgent.DebugAudioOutputFileStream); Assert.IsTrue(testAgent.DebugAudioOutputFileStream.Length > 0); await testAgent.StopAsync(); }
public async Task GetStartWithInitialSkipFromSession() { TestAgentAudioInputProvider testAgent = await TestAgentAudioInputProvider.InitializeFromNowAsync(); await testAgent.StartWithInitialSkipAsync(TimeSpan.Zero); Debug.WriteLine(testAgent); Assert.IsNull(testAgent.AgentSession); Assert.IsFalse(testAgent.Disposed); Assert.IsNotNull(testAgent.InputNode); Assert.IsNotNull(testAgent.OutputNode); Assert.IsTrue(testAgent.GraphRunning); Assert.IsNotNull(testAgent.InputGraph); }
public async Task GetAudioProducerFromNowAsync() { var result = await TestAgentAudioInputProvider.InitializeFromNowAsync(); Assert.IsNull(result.AgentSession); Assert.IsNotNull(result.InputGraph); Assert.IsFalse(result.GraphRunning); Assert.IsFalse(result.GraphRunning); Assert.IsNotNull(result.InputGraph); Assert.IsNotNull(result.OutputEncoding); Assert.AreEqual((UInt32)256000, result.OutputEncoding.Bitrate); Assert.AreEqual((UInt32)16000, result.OutputEncoding.SampleRate); Assert.AreEqual("PCM", result.OutputEncoding.Subtype); Assert.IsNotNull(result.OutputNode); Assert.IsNotNull(result.InputNode); }