I tried to concatenate 2 MP3 files using the code below. I got a new file which I can play the first half of (complete first file), but the second half is silent. The length
As all knows, the Mp3 files are just some frames and you can concatenate the streams together:
public static void Concatenate(params string[] mp3filenames)
{
Stream w = File.OpenWrite("D:\\out.mp3");
foreach (string filename in mp3filenames)
File.OpenRead(filename).CopyTo(w);
w.Flush();
w.Close();
}
and hears the usage:
Concatenate("D:\\1.mp3", "D:\\2.mp3");