Reputation: 11
How do i concatenate .Wav files's header into one Temp file. I am trying to merge multiple segments of Telephone call. And in Database this all Segments will have same call ID because it is one call but multiple segments.
Upvotes: 1
Views: 130
Reputation: 2723
See this CodeProject article: http://www.codeproject.com/Articles/35725/C-WAV-file-class-audio-mixing-and-some-light-audio
The relevant part is the class WAVFile.cs
- the merging of two WAV files is implemented in its method MergeAudioFiles
(line 1326).
This gist contains WAVFile.cs
. Other things which are useful:
Create
method (starting from line 441, as per the WAV format specification, see Wikipedia or the full specification) Open
method (line 93).INFO
section, http://www.robotplanet.dk/audio/wav_meta_data has a pretty nice overview. This is not implemented in the class referenced above.To create a temporary file (MSDN):
string tempFileName = Path.GetTempFileName();
Upvotes: 3