G
Guest
I am trying to access the data with in a wav file. I am testing with very
small files in order to keep the code simple to start with.
Basically, im writing the entire wav file to a byte[] using a fileStream.
The problem is that when reading back the data word by word and printing the
results on a general form, once the data chunk header has been read, i.e,
"data" and "chunk size", all the rest of the bytes in the array have the
value "0". Is there some thing strange about wav files that no one is telling
me. The code that reads the file into a byt array looks like this:
NOTE THE FILE IS SMALLER THAN 1MB AND IS NOT SILENT!
private int myBufferSize = 1024;
private string myFilePath "C:\\File.wav";
private byte[] myChunk = new byte[myBufferSize];
FileStream fileStream = new FileStream(myFilePath, FileMode.Open,
FileAccess.Read, FileShare.Read, myBufferSize, true);
fileStream.Read(myChunk, 0, myBufferSize);
Any help would be REALLY apprciated.
Thanks.
small files in order to keep the code simple to start with.
Basically, im writing the entire wav file to a byte[] using a fileStream.
The problem is that when reading back the data word by word and printing the
results on a general form, once the data chunk header has been read, i.e,
"data" and "chunk size", all the rest of the bytes in the array have the
value "0". Is there some thing strange about wav files that no one is telling
me. The code that reads the file into a byt array looks like this:
NOTE THE FILE IS SMALLER THAN 1MB AND IS NOT SILENT!
private int myBufferSize = 1024;
private string myFilePath "C:\\File.wav";
private byte[] myChunk = new byte[myBufferSize];
FileStream fileStream = new FileStream(myFilePath, FileMode.Open,
FileAccess.Read, FileShare.Read, myBufferSize, true);
fileStream.Read(myChunk, 0, myBufferSize);
Any help would be REALLY apprciated.
Thanks.