diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-03-13 20:15:37 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-03-13 20:15:37 +0000 |
commit | 0eb97bcae784ae245b63529b8df9b3c53ed66feb (patch) | |
tree | 79abdcfd0ef6084cad0779e5699ab15a0f1b5aac /gtk2_ardour/sfdb_freesound_mootcher.cc | |
parent | d46acb86eaa3a94fb2dc673964271ecfe0f004dd (diff) |
use g_fopen()
git-svn-id: svn://localhost/ardour2/branches/3.0@11670 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/sfdb_freesound_mootcher.cc')
-rw-r--r-- | gtk2_ardour/sfdb_freesound_mootcher.cc | 7 |
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 "";
|