1 Star 3 Fork 0

袁振峰 / NAudio

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MS-PL

Naudio是一个.Net平台的开源库,由 Mark Heath 开源.

NAudio logo

特点

  • API支持的播放模式
    • WaveOut
    • DirectSound
    • ASIO
    • WASAPI
  • 支持音频格式
    • WAV
    • AIFF
    • MP3 (ACM/DMO/MFT)
    • G.711 mu-law and a-law
    • ADPCM, G.722, Speex (NSpeex)
    • WMA, AAC, MP4 等媒体文件
  • 在各种形式的未压缩音频之间转换
    • 单声道和立体声转换
    • 比特率转换 (如8bit/16bit/24bit/32bit等遵循IEEE标准的比特率)
    • 音频采样率转换
  • 创建新的音频
    • 创建 MP3 文件 (Windows 8 or latter)
    • 创建 AAC/MP4 音频文件 (Windows 7 or latter)
    • 创建 WMA 文件
    • 创建 WAV 文件 包括 G.711, ADPCM, G.722, etc.
  • 使用32位浮动混合引擎混合和操作音频流
    • construct signal chains
    • examine sample levels for the purposes of metering or waveform rendering
    • pass blocks of samples through an FFT for metering or DSP
    • 延迟/循环/淡入/淡出
    • Perform EQ with a BiQuad filter (allowing low pass, high pass, peaking EQ, etc.)
    • Pitch shifting of audio with a phase vocoder
  • 使用各种捕获API录制音频
    • WaveIn
    • WASAPI
    • ASIO
  • 使用WASAPI录制系统音频
  • 声卡
    • 列举音频设备
    • 访问声卡控制和测量信息
  • 完整的MIDI事件模型
    • 读写MIDI文件
    • 响应MIDI事件
    • 发送MIDI事件
  • 易于扩展
    • 所有的基类都很容易从中继承,以便添加自定义组件
  • 初步支持UWP应用
    • 创建Windows商店应用程序和Windows通用应用程序

入门

推荐使用 Nuget 方式获取 NAudio NuGet. 预发行版本也会在Nuget上提供.或者直接在这里下载动态库.
NAudio 源码中附带了多个演示程序.您可以从中下载已编译的演示应用程序,并浏览源代码.

教程

文档指引

编码/解码器使用

使用音频文件

控制音频

生成音频

录制

可视化

MIDI

其他...

Additional sources of documentation for NAudio are:

NAudio 培训

If you want to get up to speed as quickly as possible with NAudio programming, I recommend you watch these two Pluralsight courses. You will need to be a subscriber to access the content, but there is 10 hours of training material on NAudio, and it also will give you access to their vast training library on other programming topics.

To be successful developing applications that process digital audio, there are some key concepts that you need to understand. To help developers quickly get up to speed with what they need to know before trying to use NAudio, I have created the Digital Audio Fundamentals course, which covers sample rates, bit depths, file formats, codecs, decibels, clipping, aliasing, synthesis, visualisations, effects and much more. In particular, the fourth module on signal chains is vital background information if you are to be effective with NAudio.

Audio Programming with NAudio is a follow-on course which contains seven hours of training material covering all the major features of NAudio. It is highly recommended that you take this course if you intend to create an application with NAudio.

我能做什么...?

The best way to learn how to use NAudio is to download the source code and look at the two demo applications - NAudioDemo and NAudioWpfDemo. These demonstrate several of the key capabilities of the NAudio framework. They also have the advantage of being kept up to date, whilst some of the tutorials you will find on the internet refer to old versions of NAudio.

FAQ

NAudio是什么?

NAudio is an open source audio API for .NET written in C# by Mark Heath, with contributions from many other developers. It is intended to provide a comprehensive set of useful utility classes from which you can construct your own audio application.

用NAudio的理由?

NAudio was created because the Framework Class Library that shipped with .NET 1.0 had no support for playing audio. The System.Media namespace introduced in .NET 2.0 provided a small amount of support, and the MediaElement in WPF and Silverlight took that a bit further. The vision behind NAudio is to provide a comprehensive set of audio related classes allowing easy development of utilities that play or record audio, or manipulate audio files in some way.

我能在项目中使用NAudio类库吗?

NAudio is licensed under the Microsoft Public License (Ms-PL) which means that you can use it in whatever project you like including commercial projects. Of course we would love it if you share any bug-fixes or enhancements you made to the original NAudio project files.

Is .NET Performance Good Enough for Audio?

While .NET cannot compete with unmanaged languages for very low latency audio work, it still performs better than many people would expect. On a fairly modest PC, you can quite easily mix multiple WAV files together, including pass them through various effects and codecs, play back glitch free with a latency of around 50ms.

遇到问题我能在哪里获取帮助及提问?

There are three main ways to get help. First, you can raise an issue here on GitHub. This is the best option when you've written some code and want to ask why it's not working as you expect. I attempt to answer all questions, but since this is a spare time project, occasionally I get behind.

You can also ask on StackOverflow and tag your question with naudio, if your question is a "how do I..." sort of question. This gives you a better chance of getting a quick answer. Please try to search first to see if your question has already been answered elsewhere.

Finally, I am occasionally able to offer paid support for situations where you need quick advice, bugfixes or new features. Please contact Mark Heath directly if you wish to pursue this option.

How do I submit a patch?

I welcome contributions to NAudio and have accepted many patches, but if you want your code to be included, please familiarise yourself with the following guidelines:

  • Your submission must be your own work, and able to be released under the MS-PL license.
  • You will need to make sure your code conforms to the layout and naming conventions used elsewhere in NAudio.
  • Remember that there are many existing users of NAudio. A patch that changes the public interface is not likely to be accepted.
  • Try to write "clean code" - avoid long functions and long classes. Try to add a new feature by creating a new class rather than putting loads of extra code inside an existing one.
  • I don't usually accept contributions I can't test, so please write unit tests (using NUnit) if at all possible. If not, give a clear explanation of how your feature can be unit tested and provide test data if appropriate. Tell me what you did to test it yourself, including what operating systems and soundcards you used.
  • If you are adding a new feature, please consider writing a short tutorial on how to use it.
  • Unless your patch is a small bugfix, I will code review it and give you feedback. You will need to be willing to make the recommended changes before it can be integrated into the main code.
  • Patches should be provided using the Pull Request feature of GitHub.
  • Please also bear in mind that when you add a feature to NAudio, that feature will generate future support requests and bug reports. Are you willing to stick around on the forums and help out people using it?
Microsoft Public License (Ms-PL) This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. 1. Definitions The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor's patent claims that read directly on its contribution. 2. Grant of Rights (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. 3. Conditions and Limitations (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

简介

Audio and MIDI library for .NET 展开 收起
C#
MS-PL
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/weivyuan/NAudio.git
git@gitee.com:weivyuan/NAudio.git
weivyuan
NAudio
NAudio
master

搜索帮助

14c37bed 8189591 565d56ea 8189591