error in reading a wav file with C++
问题 I have a .wav file and I want to read it in C++. I have done some research on the RIFF file header and wrote a code to load it. #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> using namespace std; #define BUFFER_LEN 4096 int main(int argc,char * argv[]) { // Buffers etc.. char ChunkID[4], Format[4], Subchunk1ID[4],Subchunk2ID[4]; int ChunkSize,Subchunk1Size, SampleRate, ByteRate,Subchunk2Size; short AudioFormat, NumChannels, BlockAlign,