Add some logging to your functions.
Int64 Archive::read(void* data, Int64 size)
{
std::cout << "read " << size << " bytes at position " << position << std::endl;
...
}
Int64 Archive::seek(Int64 position)
{
std::cout << "seek from " << this->position << " to " << position << std::endl;
...
}
Maybe log return values as well.
Also add a log just before and after the call to ov_pcm_total, so that you can focus on the relevant part.
By the way, I see that you never check the result of your standard stream calls, and blindly return as if everything were always ok. Maybe that's something that you could improve, to make your code more robust.