Answer the question
In order to leave comments, you need to log in
How to read the structure with such a file opening?
The structure itself:
struct WavFmt
{
unsigned short encoding;
unsigned short channels;
unsigned int frequency;
unsigned int byterate;
unsigned short blockAlign;
unsigned short bitsPerSample;
};
#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);
Answer the question
In order to leave comments, you need to log in
Here it is described how to do it, but to tie it to OpenAL you will have to google a little https://audiocoding.ru/articles/2008-05-22-wav-fil...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question