How to mix a lot of audio files with NAudio?

221 Views Asked by At

For example, I have 5 audio files. And, I want to combine these files with C# NAudio.

<------- A.wav ------->    <---- B.wav ---->
      <---- C.wav ---->  <-- D.wav --> <- E.wav ->

I goggled but I can find a solution which apply this situation.

<----- A.wav ----->
<-- B.wav -->
<------ C.wav ------>

How can I combine a lot of audio files with each length and position?

1

There are 1 best solutions below

0
Mark Heath On BEST ANSWER

You can do this with the MixingSampleProvider Use an AudioFileReader for each file. Then use the DelayBy extension on ISampleProvider to insert silence at the start of each file so they begin at the correct position.