Use g_remove instead of sys::remove in Session::remove_state
[ardour.git] / libs / ardour / source_factory.cc
index a2e93ee61b9711efb8bdedebdd63f212e7382136..b0803a9d34cbf9d55f2f9cedc8fd0f5ddfb90f99 100644 (file)
 #include "ardour/source_factory.h"
 #include "ardour/sndfilesource.h"
 #include "ardour/silentfilesource.h"
-#include "ardour/rc_configuration.h"
 #include "ardour/smf_source.h"
 #include "ardour/session.h"
 
 #ifdef  HAVE_COREAUDIO
-#define USE_COREAUDIO_FOR_FILES
-#endif
-
-#ifdef USE_COREAUDIO_FOR_FILES
 #include "ardour/coreaudiosource.h"
 #endif
 
@@ -155,12 +150,13 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
 
                        try {
                                boost::shared_ptr<AudioPlaylistSource> ap (new AudioPlaylistSource (s, node));
-
+                               
                                if (setup_peakfile (ap, true)) {
                                        return boost::shared_ptr<Source>();
                                }
 
                                ap->check_for_analysis_data_on_disk ();
+
                                SourceCreated (ap);
                                return ap;
 
@@ -187,7 +183,7 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
 
                        catch (failed_constructor& err) {
 
-#ifdef USE_COREAUDIO_FOR_FILES
+#ifdef HAVE_COREAUDIO
 
                                /* this is allowed to throw */
 
@@ -251,7 +247,7 @@ SourceFactory::createReadable (DataType type, Session& s, const string& path,
                        }
 
                        catch (failed_constructor& err) {
-#ifdef USE_COREAUDIO_FOR_FILES
+#ifdef HAVE_COREAUDIO
 
                                Source* src = new CoreAudioSource (s, path, chn, flags);
 #ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
@@ -349,7 +345,7 @@ SourceFactory::createWritable (DataType type, Session& s, const std::string& pat
 }
 
 boost::shared_ptr<Source>
-SourceFactory::createFromPlaylist (DataType type, Session& s, boost::shared_ptr<Playlist> p, const ID& orig, const std::string& name,
+SourceFactory::createFromPlaylist (DataType type, Session& s, boost::shared_ptr<Playlist> p, const PBD::ID& orig, const std::string& name,
                                   uint32_t chn, frameoffset_t start, framecnt_t len, bool copy, bool defer_peaks)
 {
        if (type == DataType::AUDIO) {