#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
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
\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