I’ve decided it’s time to release NAudio 1.6, as there are a whole load of fixes, features and improvements that have been added since I released NAudio 1.5 which I want to make available to a wider audience (if you’ve been downloading the preview releases on NuGet then you’re already more or less up to date). This marks something of a milestone for the project as it was around this time in 2002 that I first started working on NAudio, using a very early build of SharpDevelop and compiling against .NET 1.0. Some of the code I wrote back then is still in there (the oldest file is MixerInterop.cs, created on 9th December 2002).
What’s new in NAudio 1.6?
- WASAPI Loopback Capture allowing you to record what your soundcard is playing (only works on Vista and above)
- ASIO Recording ASIO doesn’t quite fit with the IWaveIn model used elsewhere in NAudio, so this is implemented in its own special way, with direct access to buffers or easy access to converted samples for most common ASIO configurations. Read more about it here.
MultiplexingSampleProviderallowing easier handling of multi-channel audio. Read more about it here.
FadeInOutSampleProvidersimplifying the process of fading audio in and out
WaveInEventfor more reliable recording on a background thread
RecordingStoppedevents now include an exception. This is very useful for cases when USB audio devices are removed during playback or record. Now there is no unhandled exception and you can detect this has happened by looking at the
EventArgs. (n.b. I’m not sure if adding a property to an
EventArgsis a breaking change – recompile your code against NAudio 1.6 to be safe).
MixingWaveProvider32for cases when you don’t need the overhead of
MixingSampleProvidershould be preferred going forwards though.
OffsetSampleProviderallows you to delay a stream, skip over part of it, truncate it, and append silence. Read about it here.
- Added a Readme file to recognise contributors to the project. I’ve tried to include everyone, but probably many are missing, so get in touch if your name’s not on the list.
- Some code tidyup (deleting old classes, some namespace changes. n.b. these are breaking changes if you used these parts of the library, but most users will not notice). This includes retiring
WaveOutThreadSafewhich was never finished anyway, and
WaveOutEventis preferred to using
WaveOutwith function callbacks in any case.
- NuGet package and CodePlex download now use the release build (No more Debug.Asserts if you forget to dispose stuff)
- Lots of bugfixes, including a concerted effort to close off as many issues in the CodePlex issue tracker as possible.
- Fix to GSM encoding
- ID3v2 Tag Creation
- ASIO multi-channel playback improvements
- MP3 decoder now flushes on reposition, fixing a potential issue with leftover sound playing when you stop, reposition and then play again.
- MP3FileReader allows pluggable frame decoders, allowing you to choose the DMO one, or use a fully managed decoder (hopefully more news on this in the near future)
- WMA Nuget Package (NAudio.Wma) for playing WMA files. Download here.
- RF64 read support
- For the full history, you can read the commit notes on CodePlex.
A big thanks to everyone who has contributed bug fixes, features, bug reports, and even a few donations this year. To date NAudio 1.5 has been downloaded 34,213 times from CodePlex and 3,539 times on NuGet. I’ll be continuing to upload pre-release versions on NuGet, so check for the latest builds here.
What’s coming up next?
I announced last release that I would finally be moving from .NET 2.0 to 3.5, and was persuaded to delay the move. However, this time I will be upgrading the project. The main reason is to enable extension methods (I know there are hacky ways to do this in .NET 2.0). With extension methods I can make the new
ISampleProvider interface much easier to use, and it will become a more prominent part of NAudio. I have some nice ideas for a fluent interface for NAudio, allowing you to construct your audio pipeline much more elegantly.
I also have plans to move my development environment over to Windows 8 in the very near future, and a WinRT version of NAudio is on my priority list. I have already implemented fully managed MP3 decoding for Windows RT, and hope to release that as an open source project soon.
There are lots of other features on my todo list for NAudio. One of the big drivers behind the
ISampleProvider interface is my desire to make audio effects easier to implement, so I’m hoping to get a collection of audio effects in the next version. I’ve also got a managed resampler which is almost working, but wasn’t quite ready to go in to NAudio 1.6.
Anyway, hope you find NAudio useful. Do let me know what cool things you have made with it, and I’ll link to you on the NAudio home page.