Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: Merge/mix several wav files into one

$
0
0

yes, you can do this with NAudio, but I'm afraid there is no demo.

You build an audio graph like this:

1) each WAV file is converted into a 32 bit floating point stream
2) you then use a WaveStream/WaveProvider that can prepend silence to position your inputs relative to one another
3) you use a mixer stream to mix them together
4) you optionally go back down to 16 bit audio

NAudio has WaveChannel32 for steps 1&2, WaveMixerStream32 for step 3 and Wave32To16Stream for step 4, so you can use them.

You can also do this with ISampleProvider based classes, but you have to make a class to do step 2 yourself.

Mark


Viewing all articles
Browse latest Browse all 5831

Trending Articles