#include <sndfile.h>
#include "file_group.h"
#include "exceptions.h"
+#include "cross.h"
using std::vector;
using std::cout;
}
_current_path = p;
- _current_file = fopen (_paths[_current_path].string().c_str(), "rb");
+ _current_file = fopen_boost (_paths[_current_path], "rb");
if (_current_file == 0) {
throw OpenFileError (_paths[_current_path]);
}
for (size_t i = 0; i < _current_path; ++i) {
full_pos += boost::filesystem::file_size (_paths[i]);
}
+#ifdef DCPOMATIC_WINDOWS
+ full_pos += _ftelli64 (_current_file);
+#else
full_pos += ftell (_current_file);
+#endif
full_pos += pos;
break;
case SEEK_END:
}
ensure_open_path (i);
- fseek (_current_file, sub_pos, SEEK_SET);
+ dcpomatic_fseek (_current_file, sub_pos, SEEK_SET);
return full_pos;
}