It played correctly before I asked it to loop, but now it just loops the first second of the track. Watching the stream's position reveals that some part of the library is making the stream seek back to the beginning of the file, and I don't understand why. getSize correctly reports the size of the OGG file, so it's not as if the library doesn't know how long it is. I do get a message telling me that the loop points are invalid, so the library definitely isn't seeing the rest of the file, even though it's there.
What's even weirder is that if I convert the OGG file to a WAV file, it loops correctly. Does anyone know what I might be doing wrong?
Int64 Archive::read(void* data, Int64 size)
{
ifs.read(reinterpret_cast<char*>(data), size);
seek(position + size);
return size;
}
Int64 Archive::seek(Int64 position)
{
ifs.seekg(sectorTable[0] + position);
return this->position = position;
}