开发者

Mixing multiple audio samples into single file with C# [closed]

开发者 https://www.devze.com 2022-12-20 09:36 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

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 question

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!


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 :-)

0

精彩评论

暂无评论...
验证码 换一张
取 消