summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk2_ardour/sfdb_freesound_mootcher.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/gtk2_ardour/sfdb_freesound_mootcher.cc b/gtk2_ardour/sfdb_freesound_mootcher.cc
index 3b179d35ca..1444660a88 100644
--- a/gtk2_ardour/sfdb_freesound_mootcher.cc
+++ b/gtk2_ardour/sfdb_freesound_mootcher.cc
@@ -47,6 +47,9 @@
#include <sys/types.h>
#include <iostream>
+#include <glib.h>
+#include <glib/gstdio.h>
+
#include "ardour/audio_library.h"
static const std::string base_url = "http://www.freesound.org/api";
@@ -305,7 +308,7 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
std::string audioFileName = basePath + "snd/" + ID + "-" + originalFileName;
// check to see if audio file already exists
- FILE *testFile = fopen(audioFileName.c_str(), "r");
+ FILE *testFile = g_fopen(audioFileName.c_str(), "r");
if (testFile) {
fseek (testFile , 0 , SEEK_END);
if (ftell (testFile) > 256) {
@@ -325,7 +328,7 @@ std::string Mootcher::getAudioFile(std::string originalFileName, std::string ID,
//now download the actual file
FILE* theFile;
- theFile = fopen( audioFileName.c_str(), "wb" );
+ theFile = g_fopen( audioFileName.c_str(), "wb" );
if (!theFile) {
return "";