Logging improvements to allow prettier displays in the server GUI.
[dcpomatic.git] / src / lib / sndfile_base.cc
index b7ac12c07c187e2a882d3d1f03ae8744254be488..712df7bda37fb2b3eb4b07bb77265e9055f3a9c2 100644 (file)
 
 */
 
+#ifdef DCPOMATIC_WINDOWS
+#include <windows.h>
+#define ENABLE_SNDFILE_WINDOWS_PROTOTYPES 1
+#endif
+#include <sndfile.h>
+
 #include "sndfile_base.h"
 #include "sndfile_content.h"
 #include "exceptions.h"
@@ -33,10 +39,10 @@ Sndfile::Sndfile (shared_ptr<const SndfileContent> c)
        /* Here be monsters.  See fopen_boost for similar shenanigans */
 #ifdef DCPOMATIC_WINDOWS
        _sndfile = sf_wchar_open (_sndfile_content->path(0).c_str(), SFM_READ, &_info);
-#else  
+#else
        _sndfile = sf_open (_sndfile_content->path(0).string().c_str(), SFM_READ, &_info);
 #endif
-       
+
        if (!_sndfile) {
                throw DecodeError (_("could not open audio file for reading"));
        }