问题描述:

I have problem with converting input wave files to wave file with 8000 sample rate.

My codes until now are:

opBrowseFile.ShowDialog();

string fileName = opBrowseFile.FileName;

System.IO.Stream waveFileStream = System.IO.File.OpenRead(fileName);

BinaryReader reader = new BinaryReader(waveFileStream);

int chunkID = reader.ReadInt32();

int fileSize = reader.ReadInt32();

int riffType = reader.ReadInt32();

int fmtID = reader.ReadInt32();

int fmtSize = reader.ReadInt32();

int fmtCode = reader.ReadInt16();

int channels = reader.ReadInt16();

int sampleRate = reader.ReadInt32();

int fmtAvgBPS = reader.ReadInt32();

int fmtBlockAlign = reader.ReadInt16();

int bitDepth = reader.ReadInt16();

So now I have header info of wave file but I want to know how to convert it to lower sample rate. I inform that I want to this by myself and not with components same NAudio.

相关阅读:
Top