从麦克风捕获声音并在 C# 中的扬声器上播放
我想从麦克风捕获声音并在 C# 中的扬声器中再次播放,但不使用 Microsoft.DirectX.directsound 怎么办?
I want to capture sound from mic and play it again in speakers in c# but not using Microsoft.DirectX.directsound how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
作为 DirectSound 的替代方案,有多媒体 API。据我所知,.net 中没有包含任何绑定,但有几个质量各异的第三方绑定。
naudio 是一个流行的.net音频库,但我不知道它在后台使用哪个API。只要你避免了名为
WaveBuffer
的令人厌恶的事情,你应该没问题。在我的项目中,我使用了 Lumisoft.Audio,主要是因为它有一个简单的API。但他们的代码质量不是很高。
As an alternative to DirectSound there are the multi-media APIs. I know of no binding that's included with .net, but there are several third party bindings of varying quality.
naudio is a popular .net audio library, but I don't know which API it uses in the background. As long as you avoid the abomination called
WaveBuffer
you should be fine.In my project I used Lumisoft.Audio, mainly because it has a simple API. But their code doesn't have a very high quality.
正如 CodeInChaos 提到的,NAudio (http://naudio.codeplex.com/) 可以解决这个问题。这是来自第 9 频道的一篇文章,希望对您有所帮助:
http:// /channel9.msdn.com/coding4fun/articles/NET-Voice-Recorder
这是来自 Mark Heath 的 NAudio 演示 (http://voicerecorder.codeplex.com/)正如他在另一篇文章中提到的:使用捕获麦克风音频流.NET框架
As CodeInChaos mentions NAudio (http://naudio.codeplex.com/) will do the trick. Here is an article from channel 9, which hopefully will help you out:
http://channel9.msdn.com/coding4fun/articles/NET-Voice-Recorder
This is from Mark Heath's NAudio demo (http://voicerecorder.codeplex.com/) as he mentions in this other post: Capture a Microphone Audio Stream Using .NET Framework