+ if (path.empty() || Glib::file_test(path, Glib::FILE_TEST_IS_DIR)) {
+ return false;
+ }
+
+#ifdef PLATFORM_WINDOWS
+ int fd = g_open (path.c_str(), O_RDONLY, 0444);
+#else
+ int fd = ::open (path.c_str(), O_RDONLY, 0444);
+#endif
+
+ if (fd == -1) {
+ error << string_compose ( _("SndFileSource: cannot open file \"%1\" for reading"), path)
+ << endmsg;
+ return false;
+ }
+ if ((sf = sf_open_fd (fd, SFM_READ, &sf_info, true)) == 0) {
+ char errbuf[1024];