tags:

views:

301

answers:

3

Hi everyone,

I'm looking for a library capable of creating an audio file (mp3 or wav).
NAudio stands out as a good candidate, but not sure if and how it can do specifically what I need.

I want to mix a number of audio samples into a single file, have them play simultaneously with control over each sample's start and end timing when "rendering" the audio file.

Is this possible with NAudio? If so, how? Can you point out a good tutorial?
Also, are there any other recommended .net audio libraries?

Thanks!

+2  A: 

There are a few NAudio tutorials on Sebastian Gray's blog. One of the example projects is very similar to what you are describing.

Last time I used NAudio it was not very good at writing WAV files - some of the generated WAVs were valid but too short, missing the last few seconds of input. That may have been fixed by now. I'm rolled my own WAV writer to work around it.

finnw
+1  A: 

You should try the BASS audio library: www.un4seen.com Very powerful, can easily do what you described above (see the BASSmix and BASSenc functions)

The API is C though, not C#. There's a BASS.NET version too. Lots of code examples, good documentation and a great community :-)

darasan
A: 

Please see this code http://alvas.net/alvas.audio,tips.aspx#tip77

ava