diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-25 02:34:04 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-25 02:34:04 +0100 |
commit | f845bef8c6e4d33d7de2b6ea120d64f12c1c196e (patch) | |
tree | be19b484a9bd77fe5d4a9def6956f5ddb665302c /libs/ardour/source_factory.cc | |
parent | 09d45eff4260bf2fa3d368fa28010faa75519651 (diff) |
Update source-factory boost-debug
Diffstat (limited to 'libs/ardour/source_factory.cc')
-rw-r--r-- | libs/ardour/source_factory.cc | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc index 051f7c063c..de9d255a70 100644 --- a/libs/ardour/source_factory.cc +++ b/libs/ardour/source_factory.cc @@ -46,6 +46,7 @@ #include "ardour/coreaudiosource.h" #endif +// #define BOOST_DEBUG_SOURCE #include "pbd/i18n.h" @@ -140,8 +141,8 @@ boost::shared_ptr<Source> SourceFactory::createSilent (Session& s, const XMLNode& node, samplecnt_t nframes, float sr) { Source* src = new SilentFileSource (s, node, nframes, sr); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting ((void*)src, "Source"); #endif boost::shared_ptr<Source> ret (src); // no analysis data - the file is non-existent @@ -185,8 +186,8 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks) try { Source* src = new SndFileSource (s, node); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting ((void*)src, "Source"); #endif boost::shared_ptr<Source> ret (src); if (setup_peakfile (ret, defer_peaks)) { @@ -200,8 +201,8 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks) #ifdef HAVE_COREAUDIO try { Source* src = new CoreAudioSource (s, node); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting ((void*)src, "Source"); #endif boost::shared_ptr<Source> ret (src); @@ -223,8 +224,8 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks) boost::shared_ptr<SMFSource> src (new SMFSource (s, node)); Source::Lock lock(src->mutex()); src->load_model (lock, true); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting (src.get(), "Source"); #endif src->check_for_analysis_data_on_disk (); SourceCreated (src); @@ -246,8 +247,8 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path, try { Source* src = new SndFileSource (s, path, chn, flags); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting ((void*)src, "Source"); #endif boost::shared_ptr<Source> ret (src); if (setup_peakfile (ret, defer_peaks)) { @@ -263,8 +264,8 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path, #ifdef HAVE_COREAUDIO try { Source* src = new CoreAudioSource (s, path, chn, flags); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting ((void*)src, "Source"); #endif boost::shared_ptr<Source> ret (src); if (setup_peakfile (ret, defer_peaks)) { @@ -282,8 +283,8 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path, if (!announce && (!AudioFileSource::get_build_peakfiles () || defer_peaks)) { try { Source* src = new Mp3FileSource (s, path, chn, flags); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting ((void*)src, "Source"); #endif boost::shared_ptr<Source> ret (src); return ret; @@ -304,8 +305,8 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path, boost::shared_ptr<SMFSource> src (new SMFSource (s, path)); Source::Lock lock(src->mutex()); src->load_model (lock, true); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting (src.get(), "Source"); #endif if (announce) { @@ -335,8 +336,8 @@ SourceFactory::createWritable (DataType type, Session& s, const std::string& pat (destructive ? Source::Flag (SndFileSource::default_writable_flags | Source::Destructive) : SndFileSource::default_writable_flags)); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting ((void*)src, "Source"); #endif boost::shared_ptr<Source> ret (src); @@ -360,8 +361,8 @@ SourceFactory::createWritable (DataType type, Session& s, const std::string& pat Source::Lock lock(src->mutex()); src->load_model (lock, true); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting (src.get(), "Source"); #endif // no analysis data - this is a new file @@ -387,8 +388,8 @@ SourceFactory::createForRecovery (DataType type, Session& s, const std::string& if (type == DataType::AUDIO) { Source* src = new SndFileSource (s, path, chn); -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (src, "Source"); +#if defined BOOST_SP_ENABLE_DEBUG_HOOKS && defined BOOST_DEBUG_SOURCE + boost_debug_shared_ptr_mark_interesting ((void*)src, "Source"); #endif boost::shared_ptr<Source> ret (src); |