Reading raw wav data from memory?

#include “FAudiolib.h”

void FAudioLib::LoadSoundData(std::string filename) {
std::string header;
long version;
long nofdefines;
long nofstreams;
long nofwaves;
long nofsoundarchives;
long nofmodules;
std::ifstream myfile(filename, std::ios::binary);
myfile.close();
}

void FAudioLib::CreateStream() {
memset(&exinfo, 0, sizeof(FMOD_CREATESOUNDEXINFO));
exinfo.cbsize = sizeof(FMOD_CREATESOUNDEXINFO);
exinfo.length = myfile.getBuffLen(); //length;
result = system->createSound((const char *)buff, FMOD_OPENMEMORY, &exinfo, &sound);
ERRCHECK(result);
Common_UnloadFileMemory(buff); // don’t need the original memory any more. Note! If loading as a stream, the memory must stay active so do not free it!
}

void FAudioLib::InitAudioSystem() {
Common_Init(&extradriverdata);

/*
Create a System object and initialize
*/
result = FMOD::System_Create(&system);
ERRCHECK(result);

result = system->getVersion(&version);
ERRCHECK(result);

if (version < FMOD_VERSION)
{
	Common_Fatal("FMOD lib version %08x doesn't match header version %08x", version, FMOD_VERSION);
}

result = system->init(32, FMOD_INIT_NORMAL, extradriverdata);
ERRCHECK(result);

}

Depending on what you are trying to do, you will want to use either: