- int fd = ::open(_path.c_str(), O_LARGEFILE | (_writeable ? (O_RDWR|O_CREAT) : O_RDONLY));
- if (fd == -1) return false;
- fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
-
- _sndfile = sf_open_fd (fd, _writeable ? SFM_RDWR : SFM_READ, _info, 1);
-
- if (sf_open_fd == 0) {
- ::close(fd);
- }
-