summaryrefslogtreecommitdiff
path: root/libs/ardour/source_factory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/source_factory.cc')
-rw-r--r--libs/ardour/source_factory.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/ardour/source_factory.cc b/libs/ardour/source_factory.cc
index 3375ff9f0d..cd3c9ef1e8 100644
--- a/libs/ardour/source_factory.cc
+++ b/libs/ardour/source_factory.cc
@@ -34,6 +34,7 @@
#include "ardour/boost_debug.h"
#include "ardour/midi_playlist.h"
#include "ardour/midi_playlist_source.h"
+#include "ardour/mp3filesource.h"
#include "ardour/source.h"
#include "ardour/source_factory.h"
#include "ardour/sndfilesource.h"
@@ -281,6 +282,19 @@ SourceFactory::createExternal (DataType type, Session& s, const string& path,
} catch (...) { }
#endif
+ /* only create mp3s for audition: no announce, no peaks */
+ 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");
+#endif
+ boost::shared_ptr<Source> ret (src);
+ return ret;
+
+ } catch (failed_constructor& err) { }
+ }
+
} else {
// eh?
}