#include <sndfile.h>
+#include <glib/gstdio.h>
#include <glibmm/miscutils.h>
#include <glibmm/fileutils.h>
-#include <glibmm/thread.h>
+#include <glibmm/threads.h>
#include "ardour/audiofilesource.h"
#include "ardour/debug.h"
}
};
-Glib::StaticPrivate<SizedSampleBuffer> thread_interleave_buffer = GLIBMM_STATIC_PRIVATE_INIT;
+Glib::Threads::Private<SizedSampleBuffer> thread_interleave_buffer;
/** Constructor used for existing external-to-session files. */
AudioFileSource::AudioFileSource (Session& s, const string& path, Source::Flag flags)
/* note that external files have their own path as "origin" */
, FileSource (s, DataType::AUDIO, path, path, flags)
{
- /* note that origin remains empty */
-
if (init (_path, true)) {
throw failed_constructor ();
}
{
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());
}
}
int
AudioFileSource::move_dependents_to_trash()
{
- return ::unlink (peakpath.c_str());
+ return ::g_unlink (peakpath.c_str());
}
void
AudioFileSource::setup_peakfile ()
{
if (!(_flags & NoPeakFile)) {
- return initialize_peakfile (_file_is_new, _path);
+ return initialize_peakfile (_path);
} else {
return 0;
}