X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=libs%2Fpbd%2Fsndfile_manager.cc;h=c028bc11bacae12e47c33b413c7268f14e0dbd36;hb=c046b7c9d36d54600907565271a8ea2ceb004300;hp=c3fbd7be5bbceadb372201195f47cf67b433b978;hpb=676a23e0319970021963fcb0d4964e7d714de1ea;p=ardour.git diff --git a/libs/pbd/sndfile_manager.cc b/libs/pbd/sndfile_manager.cc index c3fbd7be5b..c028bc11ba 100644 --- a/libs/pbd/sndfile_manager.cc +++ b/libs/pbd/sndfile_manager.cc @@ -22,7 +22,6 @@ */ #include -#include #include #include #include @@ -90,16 +89,7 @@ SndFileDescriptor::open () { /* we must have a lock on the FileManager's mutex */ - 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); - } - + _sndfile = sf_open (_path.c_str(), _writeable ? SFM_RDWR : SFM_READ, _info); return (_sndfile == 0); }