[英]Recommended way to work with audio in .NET applications?
I'm trying to get started with a simple audio application under .NET 3.5 (preferably in VB.NET, but will happily use C#). 我正在尝试使用.NET 3.5下的简单音频应用程序(最好是在VB.NET中,但很乐意使用C#)。 What I'd like to do is:
我想做的是:
First thing I noticed is that audio support in the basic .NET Framework is pretty much nonexistent. 我注意到的第一件事是基本.NET Framework中的音频支持几乎不存在。 Googling around a bit found some sample code, mostly using Managed DirectX.
谷歌搜索了一些示例代码,主要是使用Managed DirectX。 However, the lack of MSDN documentation, vintage of the libraries (2004) and the following menacing MDA exception in VS.NET 2008, convinced me this is a dead end:
然而,缺乏MSDN文档,库的复古(2004)以及VS.NET 2008中的以下威胁性MDA异常使我确信这是一个死胡同:
Message: DLL 'Microsoft.DirectX.dll' is attempting managed execution inside
OS Loader lock. Do not attempt to run managed code inside a DllMain or image
initialization function since doing so can cause the application to hang.
...which I think loosely translates as "don't even try to use this stuff." ...我认为松散地翻译为“甚至不尝试使用这些东西。” Am I missing something here, or is Managed DirectX really dead?
我在这里遗漏了什么,或者Managed DirectX真的死了吗? Another StackOverlow question suggests that XNA is a replacement for Managed DirectX, but it lacks the kind of low-level functionality I need.
另一个StackOverlow问题表明XNA是Managed DirectX的替代品,但它缺乏我需要的那种低级功能。
So, which API or third-party library is actually useful for audio development under .NET? 那么,哪个API或第三方库对.NET下的音频开发实际上有用呢? Using COM interop or P/Invoke is acceptable, as long as there's some decent .NET example code available to get started with...
使用COM互操作或P / Invoke是可以接受的,只要有一些不错的.NET示例代码可用于开始...
Have you looked into NAudio on CodePlex ? 你有没有在CodePlex上看过NAudio ? It looks like it has the features you need.
看起来它具有您需要的功能。
我一直是拥有.NET API的BASS库的粉丝。
另一个是FMOD 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.