use g_fopen()
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 13 Mar 2012 20:15:37 +0000 (20:15 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 13 Mar 2012 20:15:37 +0000 (20:15 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11670 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/sfdb_freesound_mootcher.cc

index 3b179d35ca717955f9a295d1574e24d896aa2ba6..1444660a88ef245af028edb33827283829af5cfe 100644 (file)
@@ -47,6 +47,9 @@
 #include <sys/types.h>\r
 #include <iostream>\r
 \r
+#include <glib.h>\r
+#include <glib/gstdio.h>\r
+\r
 #include "ardour/audio_library.h"\r
 \r
 static const std::string base_url = "http://www.freesound.org/api";\r
@@ -305,7 +308,7 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
        std::string audioFileName = basePath + "snd/" + ID + "-" + originalFileName;\r
 \r
        // check to see if audio file already exists\r
-       FILE *testFile = fopen(audioFileName.c_str(), "r");\r
+       FILE *testFile = g_fopen(audioFileName.c_str(), "r");\r
        if (testFile) {  \r
                fseek (testFile , 0 , SEEK_END);\r
                if (ftell (testFile) > 256) {\r
@@ -325,7 +328,7 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
 \r
        //now download the actual file\r
        FILE* theFile;\r
-       theFile = fopen( audioFileName.c_str(), "wb" );\r
+       theFile = g_fopen( audioFileName.c_str(), "wb" );\r
 \r
        if (!theFile) {\r
                return "";\r