LV2: don't leave active plugins deactivated after latency-compute-run
[ardour.git] / libs / ardour / audiofilesource.cc
index 8c3bf0017659cfcfb9561d48c130a9ff81e4ba13..9c1b969190c530d8cb2ec95b066b1b02b0c349a1 100644 (file)
@@ -32,6 +32,7 @@
 
 #include "pbd/convert.h"
 #include "pbd/basename.h"
+#include "pbd/file_utils.h"
 #include "pbd/mountpoint.h"
 #include "pbd/stl_delete.h"
 #include "pbd/strsplit.h"
@@ -41,6 +42,7 @@
 
 #include <sndfile.h>
 
+#include <glib/gstdio.h>
 #include <glibmm/miscutils.h>
 #include <glibmm/fileutils.h>
 #include <glibmm/threads.h>
@@ -150,8 +152,8 @@ AudioFileSource::~AudioFileSource ()
 {
        DEBUG_TRACE (DEBUG::Destruction, string_compose ("AudioFileSource destructor %1, removable? %2\n", _path, removable()));
        if (removable()) {
-               unlink (_path.c_str());
-               unlink (peakpath.c_str());
+               ::g_unlink (_path.c_str());
+               ::g_unlink (peakpath.c_str());
        }
 }
 
@@ -309,7 +311,7 @@ AudioFileSource::mark_streaming_write_completed ()
 int
 AudioFileSource::move_dependents_to_trash()
 {
-       return ::unlink (peakpath.c_str());
+       return ::g_unlink (peakpath.c_str());
 }
 
 void
@@ -412,3 +414,4 @@ AudioFileSource::get_interleave_buffer (framecnt_t size)
 
        return ssb->buf;
 }
+