How to consider the structure of such a file is opened?

The structure:
struct WavFmt
{
 unsigned short encoding;
 unsigned short channels;
 unsigned int frequency;
 unsigned int byterate;
 unsigned short blockAlign;
 unsigned short bitsPerSample;
};

the open method of the file
#ifdef _WIN32
life=open(filename,_A_ARCH);
 if (life == -1) 
{
 printf("Open failed on input file: %s\n", filename);
#ifdef _WIN32
 wchar_t path[MAX_PATH];
GetCurrentDirectory(sizeof(path),path);
 //std::string path_in_string = path;
 std::wcout << path/*path_in_string.c_str()*/ << std::endl;
#endif // _WIN32
}
#else
 life=open(filename,O_RDONLY);
April 7th 20 at 15:22
1 answer
April 7th 20 at 15:24
Solution
Here it is described how to do it, but to tie to OpenAL and have a little Google https://audiocoding.ru/articles/2008-05-22-wav-fil...

Find more questions by tags C++OpenALWAV