I have a library of different words/phrases, and in order to build sentences at present I add a combination of these phrases into a playlist to make a sentence. Unfortunate
As MP3s are a compressed audio source, I imagine that you can't just concatenate them into a single file without decoding each one first to the wave form that it would play. This may be quite intensive. Perhaps you could cheat by using a critical section when playing back your phrase so that the CPU is not stolen from you until the phrase was complete. This isn't necessarily playing nice with other threads but might work if your phrases are short.
MP3 files consist of "frames", that each represent a short snippet (I think around 25 ms) of audio.
So yes, you can just concatenate them without a problem.
here's how you can concatenate MP3 files using NAudio:
public static void Combine(string[] inputFiles, Stream output)
{
foreach (string file in inputFiles)
{
Mp3FileReader reader = new Mp3FileReader(file);
if ((output.Position == 0) && (reader.Id3v2Tag != null))
{
output.Write(reader.Id3v2Tag.RawData, 0, reader.Id3v2Tag.RawData.Length);
}
Mp3Frame frame;
while ((frame = reader.ReadNextFrame()) != null)
{
output.Write(frame.RawData, 0, frame.RawData.Length);
}
}
}
see here for more info
On simple option is to shell to the command line:
copy /b *.mp3 c:\new.mp3
Better would be to concatenate the streams. That's been answered here: What would be the fastest way to concatenate three files in C#?