I loaded an entire audio file into memory. Now I need to read from different offsets, in different amounts, with various callbacks.
Is it possible to use the data in memory as in std::istream?
memFile.read, memfile.seekg, memFile.telgq...
Let's say I have something like:
size_t dataSize = fileLenght; // for example 5672
char *fullData = new char[dataSize];
// copy data to fullData...
Then I want to do something like:
std::istream / fstream / ifstream dataObj(fullData);
dataObj.seekq(0, begin);
dataObj.read(....);
These are pseudo code. Things can be different.
I have the start position, end position and length of the file loaded into memory.