i am working on splitting .wav files with bitrate 13 kbps,mono,
sample rate 8 khz and audio format GSM 6.10.my code is like this
private void SplitFile(string FileInputPath, string FolderOutputPath, int OutputFiles)
{
string inputFile = FileInputPath; // Substitute this with your Input File
FileStream fs = new FileStream(inputFile, FileMode.Open, FileAccess.Read);
int numberOfFiles = Convert.ToInt32(OutputFiles);
int sizeOfEachFile = (int)Math.Ceiling((double)fs.Length / numberOfFiles);
for (int i = 1; i <= numberOfFiles; i++)
{
string baseFileName = Path.GetFileNameWithoutExtension(inputFile);
string extension = Path.GetExtension(inputFile);
FileStream outputFile = new FileStream(Path.GetDirectoryName(inputFile) + "\\" + baseFileName + "." + i.ToString().PadLeft(5, Convert.ToChar("0")) + "." + extension, FileMode.Create, FileAccess.Write);
int bytesRead = 0;
byte[] buffer = new byte[sizeOfEachFile];
Actually the .wav file have some properties like Audio formate-gsm 6.10,Audio sample rate 8KHz ,channels 1 mono,Bit Rate 13 kbps. so using this we have to split
plz tel me the request i will post
Ok.Then give me the hint is the way i am trying to split wav file is correct or not.for some .wav files it is splitting correctly and playing two files and some files it is splittings but error in playing second file.And Give me any supporting links to do this task.
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.