Mixing multiple audio samples into single file with C# [closed]
We don’t allow questions seeking recommendations for 开发者_运维技巧books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this questionI'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!
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 rolled my own WAV writer to work around it.
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 :-)
精彩评论