mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-31 19:07:43 +01:00
Update source-factory boost-debug
This commit is contained in:
parent
09d45eff42
commit
f845bef8c6
1 changed files with 23 additions and 22 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue