mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-16 19:56:31 +01:00
rename join regions op as combine regions; save and restore nested playlists, sources, regions; add undo/redo for combine; fixup peakfile use/discovery
git-svn-id: svn://localhost/ardour2/branches/3.0@9528 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4b848856eb
commit
99aa8c6338
13 changed files with 167 additions and 76 deletions
|
|
@ -228,7 +228,7 @@
|
||||||
<menuitem action='play-selected-regions'/>
|
<menuitem action='play-selected-regions'/>
|
||||||
<menuitem action='export-region'/>
|
<menuitem action='export-region'/>
|
||||||
<menuitem action='bounce-region'/>
|
<menuitem action='bounce-region'/>
|
||||||
<menuitem action='join-regions'/>
|
<menuitem action='combine-regions'/>
|
||||||
<menuitem action='analyze-region'/>
|
<menuitem action='analyze-region'/>
|
||||||
<menuitem action='toggle-region-lock'/>
|
<menuitem action='toggle-region-lock'/>
|
||||||
<menuitem action='toggle-region-lock-style'/>
|
<menuitem action='toggle-region-lock-style'/>
|
||||||
|
|
|
||||||
|
|
@ -1099,7 +1099,8 @@ class Editor : public PublicEditor, public PBD::ScopedConnectionList, public ARD
|
||||||
void duplicate_some_regions (RegionSelection&, float times);
|
void duplicate_some_regions (RegionSelection&, float times);
|
||||||
void duplicate_selection (float times);
|
void duplicate_selection (float times);
|
||||||
void region_fill_selection ();
|
void region_fill_selection ();
|
||||||
void join_regions ();
|
void combine_regions ();
|
||||||
|
void uncombine_regions ();
|
||||||
|
|
||||||
void region_fill_track ();
|
void region_fill_track ();
|
||||||
void audition_playlist_region_standalone (boost::shared_ptr<ARDOUR::Region>);
|
void audition_playlist_region_standalone (boost::shared_ptr<ARDOUR::Region>);
|
||||||
|
|
|
||||||
|
|
@ -1372,7 +1372,7 @@ Editor::register_region_actions ()
|
||||||
reg_sens (_region_actions, "play-selected-regions", _("Play"), sigc::mem_fun(*this, &Editor::play_selected_region));
|
reg_sens (_region_actions, "play-selected-regions", _("Play"), sigc::mem_fun(*this, &Editor::play_selected_region));
|
||||||
|
|
||||||
reg_sens (_region_actions, "bounce-region", _("Bounce"), sigc::mem_fun (*this, &Editor::bounce_region_selection));
|
reg_sens (_region_actions, "bounce-region", _("Bounce"), sigc::mem_fun (*this, &Editor::bounce_region_selection));
|
||||||
reg_sens (_region_actions, "join-regions", _("Join"), sigc::mem_fun (*this, &Editor::join_regions));
|
reg_sens (_region_actions, "combine-regions", _("Combine"), sigc::mem_fun (*this, &Editor::combine_regions));
|
||||||
|
|
||||||
reg_sens (_region_actions, "analyze-region", _("Spectral Analysis..."), sigc::mem_fun (*this, &Editor::analyze_region_selection));
|
reg_sens (_region_actions, "analyze-region", _("Spectral Analysis..."), sigc::mem_fun (*this, &Editor::analyze_region_selection));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6403,7 +6403,7 @@ Editor::toggle_region_mute ()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Editor::join_regions ()
|
Editor::combine_regions ()
|
||||||
{
|
{
|
||||||
/* foreach track with selected regions, take all selected regions
|
/* foreach track with selected regions, take all selected regions
|
||||||
and join them into a new region containing the subregions (as a
|
and join them into a new region containing the subregions (as a
|
||||||
|
|
@ -6413,6 +6413,10 @@ Editor::join_regions ()
|
||||||
typedef set<RouteTimeAxisView*> RTVS;
|
typedef set<RouteTimeAxisView*> RTVS;
|
||||||
RTVS tracks;
|
RTVS tracks;
|
||||||
|
|
||||||
|
if (selection->regions.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
for (RegionSelection::iterator i = selection->regions.begin(); i != selection->regions.end(); ++i) {
|
||||||
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&(*i)->get_time_axis_view());
|
RouteTimeAxisView* rtv = dynamic_cast<RouteTimeAxisView*>(&(*i)->get_time_axis_view());
|
||||||
|
|
||||||
|
|
@ -6421,8 +6425,12 @@ Editor::join_regions ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
begin_reversible_command (_("combine regions"));
|
||||||
|
|
||||||
for (RTVS::iterator i = tracks.begin(); i != tracks.end(); ++i) {
|
for (RTVS::iterator i = tracks.begin(); i != tracks.end(); ++i) {
|
||||||
(*i)->join_regions ();
|
(*i)->combine_regions ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
commit_reversible_command ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -957,7 +957,6 @@ Editor::sensitize_the_right_region_actions ()
|
||||||
if (!selection->time.empty()) {
|
if (!selection->time.empty()) {
|
||||||
_region_actions->get_action("split-region")->set_sensitive (true);
|
_region_actions->get_action("split-region")->set_sensitive (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} else if (mouse_mode != MouseObject) {
|
} else if (mouse_mode != MouseObject) {
|
||||||
|
|
@ -1063,9 +1062,11 @@ Editor::sensitize_the_right_region_actions ()
|
||||||
_region_actions->get_action("show-region-list-editor")->set_sensitive (false);
|
_region_actions->get_action("show-region-list-editor")->set_sensitive (false);
|
||||||
_region_actions->get_action("show-region-properties")->set_sensitive (false);
|
_region_actions->get_action("show-region-properties")->set_sensitive (false);
|
||||||
_region_actions->get_action("rename-region")->set_sensitive (false);
|
_region_actions->get_action("rename-region")->set_sensitive (false);
|
||||||
|
_region_actions->get_action("combine-regions")->set_sensitive (true);
|
||||||
} else if (rs.size() == 1) {
|
} else if (rs.size() == 1) {
|
||||||
_region_actions->get_action("add-range-markers-from-region")->set_sensitive (false);
|
_region_actions->get_action("add-range-markers-from-region")->set_sensitive (false);
|
||||||
_region_actions->get_action("close-region-gaps")->set_sensitive (false);
|
_region_actions->get_action("close-region-gaps")->set_sensitive (false);
|
||||||
|
_region_actions->get_action("combine-regions")->set_sensitive (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!have_midi) {
|
if (!have_midi) {
|
||||||
|
|
|
||||||
|
|
@ -2486,7 +2486,7 @@ void add_region_to_list (RegionView* rv, Playlist::RegionList* l, uint32_t* max_
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RouteTimeAxisView::join_regions ()
|
RouteTimeAxisView::combine_regions ()
|
||||||
{
|
{
|
||||||
assert (is_track());
|
assert (is_track());
|
||||||
|
|
||||||
|
|
@ -2495,11 +2495,16 @@ RouteTimeAxisView::join_regions ()
|
||||||
}
|
}
|
||||||
|
|
||||||
Playlist::RegionList selected_regions;
|
Playlist::RegionList selected_regions;
|
||||||
|
boost::shared_ptr<Playlist> playlist = track()->playlist();
|
||||||
uint32_t max_level = 0;
|
uint32_t max_level = 0;
|
||||||
|
|
||||||
_view->foreach_selected_regionview (sigc::bind (sigc::ptr_fun (add_region_to_list), &selected_regions, &max_level));
|
_view->foreach_selected_regionview (sigc::bind (sigc::ptr_fun (add_region_to_list), &selected_regions, &max_level));
|
||||||
|
|
||||||
uint32_t num_joined_regions = track()->playlist()->count_joined_regions();
|
uint32_t num_joined_regions = playlist->count_joined_regions();
|
||||||
string name = string_compose (_("%1 combine-%2 (%3)"), track()->playlist()->name(), num_joined_regions+1, max_level+1);
|
string name = string_compose (_("%1 compound-%2 (%3)"), playlist->name(), num_joined_regions+1, max_level+1);
|
||||||
track()->playlist()->join (selected_regions, name);
|
|
||||||
|
|
||||||
|
playlist->clear_changes ();
|
||||||
|
playlist->join (selected_regions, name);
|
||||||
|
_session->add_command (new StatefulDiffCommand (playlist));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ public:
|
||||||
/* Editing operations */
|
/* Editing operations */
|
||||||
void cut_copy_clear (Selection&, Editing::CutCopyOp);
|
void cut_copy_clear (Selection&, Editing::CutCopyOp);
|
||||||
bool paste (ARDOUR::framepos_t, float times, Selection&, size_t nth);
|
bool paste (ARDOUR::framepos_t, float times, Selection&, size_t nth);
|
||||||
void join_regions ();
|
void combine_regions ();
|
||||||
void toggle_automation_track (const Evoral::Parameter& param);
|
void toggle_automation_track (const Evoral::Parameter& param);
|
||||||
|
|
||||||
/* The editor calls these when mapping an operation across multiple tracks */
|
/* The editor calls these when mapping an operation across multiple tracks */
|
||||||
|
|
|
||||||
|
|
@ -376,6 +376,7 @@ public:
|
||||||
void timestamp_layer_op (boost::shared_ptr<Region>);
|
void timestamp_layer_op (boost::shared_ptr<Region>);
|
||||||
|
|
||||||
void _split_region (boost::shared_ptr<Region>, framepos_t position);
|
void _split_region (boost::shared_ptr<Region>, framepos_t position);
|
||||||
|
void load_nested_sources (const XMLNode& node);
|
||||||
};
|
};
|
||||||
|
|
||||||
} /* namespace ARDOUR */
|
} /* namespace ARDOUR */
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
#include "ardour/audio_playlist_source.h"
|
#include "ardour/audio_playlist_source.h"
|
||||||
#include "ardour/audioregion.h"
|
#include "ardour/audioregion.h"
|
||||||
#include "ardour/debug.h"
|
#include "ardour/debug.h"
|
||||||
|
#include "ardour/filename_extensions.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/session_directory.h"
|
#include "ardour/session_directory.h"
|
||||||
#include "ardour/session_playlists.h"
|
#include "ardour/session_playlists.h"
|
||||||
|
|
@ -52,14 +53,12 @@ AudioPlaylistSource::AudioPlaylistSource (Session& s, const std::string& name, b
|
||||||
, PlaylistSource (s, name, p, DataType::AUDIO, begin, len, flags)
|
, PlaylistSource (s, name, p, DataType::AUDIO, begin, len, flags)
|
||||||
, _playlist_channel (chn)
|
, _playlist_channel (chn)
|
||||||
{
|
{
|
||||||
_peak_path = Glib::build_filename (_session.session_directory().peak_path().to_string(), name);
|
|
||||||
|
|
||||||
AudioSource::_length = len;
|
AudioSource::_length = len;
|
||||||
ensure_buffers_for_level (_level);
|
ensure_buffers_for_level (_level);
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioPlaylistSource::AudioPlaylistSource (Session& s, const XMLNode& node)
|
AudioPlaylistSource::AudioPlaylistSource (Session& s, const XMLNode& node)
|
||||||
: Source (s, DataType::AUDIO, "toBeRenamed")
|
: Source (s, node)
|
||||||
, AudioSource (s, node)
|
, AudioSource (s, node)
|
||||||
, PlaylistSource (s, node)
|
, PlaylistSource (s, node)
|
||||||
{
|
{
|
||||||
|
|
@ -91,7 +90,6 @@ AudioPlaylistSource::get_state ()
|
||||||
|
|
||||||
snprintf (buf, sizeof (buf), "%" PRIu32, _playlist_channel);
|
snprintf (buf, sizeof (buf), "%" PRIu32, _playlist_channel);
|
||||||
node.add_property ("channel", buf);
|
node.add_property ("channel", buf);
|
||||||
node.add_property ("peak-path", _peak_path);
|
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
@ -124,12 +122,6 @@ AudioPlaylistSource::set_state (const XMLNode& node, int version, bool with_desc
|
||||||
|
|
||||||
sscanf (prop->value().c_str(), "%" PRIu32, &_playlist_channel);
|
sscanf (prop->value().c_str(), "%" PRIu32, &_playlist_channel);
|
||||||
|
|
||||||
if ((prop = node.property (X_("peak-path"))) == 0) {
|
|
||||||
throw failed_constructor ();
|
|
||||||
}
|
|
||||||
|
|
||||||
_peak_path = prop->value ();
|
|
||||||
|
|
||||||
ensure_buffers_for_level (_level);
|
ensure_buffers_for_level (_level);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
@ -224,23 +216,12 @@ AudioPlaylistSource::sample_rate () const
|
||||||
int
|
int
|
||||||
AudioPlaylistSource::setup_peakfile ()
|
AudioPlaylistSource::setup_peakfile ()
|
||||||
{
|
{
|
||||||
/* the peak data is setup once and once only
|
_peak_path = Glib::build_filename (_session.session_directory().peak_path().to_string(), name() + ARDOUR::peakfile_suffix);
|
||||||
*/
|
|
||||||
|
|
||||||
if (!Glib::file_test (_peak_path, Glib::FILE_TEST_EXISTS)) {
|
|
||||||
/* the 2nd argument here will be passed
|
|
||||||
in to ::peak_path, and is irrelevant
|
|
||||||
since our peak file path is fixed and
|
|
||||||
not dependent on anything.
|
|
||||||
*/
|
|
||||||
return initialize_peakfile (false, string());
|
return initialize_peakfile (false, string());
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
string
|
string
|
||||||
AudioPlaylistSource::peak_path (string /*audio_path*/)
|
AudioPlaylistSource::peak_path (string /*audio_path_IGNORED*/)
|
||||||
{
|
{
|
||||||
return _peak_path;
|
return _peak_path;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2221,6 +2221,26 @@ Playlist::update (const RegionListProperty::ChangeRecord& change)
|
||||||
thaw ();
|
thaw ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
Playlist::load_nested_sources (const XMLNode& node)
|
||||||
|
{
|
||||||
|
XMLNodeList nlist;
|
||||||
|
XMLNodeConstIterator niter;
|
||||||
|
|
||||||
|
nlist = node.children();
|
||||||
|
|
||||||
|
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||||
|
if ((*niter)->name() == "Source") {
|
||||||
|
try {
|
||||||
|
SourceFactory::create (_session, **niter, true);
|
||||||
|
}
|
||||||
|
catch (failed_constructor& err) {
|
||||||
|
error << string_compose (_("Cannot reconstruct nested source for playlist %1"), name()) << endmsg;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
Playlist::set_state (const XMLNode& node, int version)
|
Playlist::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
|
|
@ -2264,6 +2284,19 @@ Playlist::set_state (const XMLNode& node, int version)
|
||||||
|
|
||||||
nlist = node.children();
|
nlist = node.children();
|
||||||
|
|
||||||
|
/* find the "Nested" node, if any, and recreate the PlaylistSources
|
||||||
|
listed there
|
||||||
|
*/
|
||||||
|
|
||||||
|
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||||
|
child = *niter;
|
||||||
|
|
||||||
|
if (child->name() == "Nested") {
|
||||||
|
load_nested_sources (*child);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||||
|
|
||||||
child = *niter;
|
child = *niter;
|
||||||
|
|
@ -2348,6 +2381,31 @@ Playlist::state (bool full_state)
|
||||||
|
|
||||||
if (full_state) {
|
if (full_state) {
|
||||||
RegionLock rlock (this, false);
|
RegionLock rlock (this, false);
|
||||||
|
XMLNode* nested_node = 0;
|
||||||
|
|
||||||
|
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
|
||||||
|
if ((*i)->max_source_level() > 0) {
|
||||||
|
|
||||||
|
if (!nested_node) {
|
||||||
|
nested_node = new XMLNode (X_("Nested"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* region is compound - get its playlist and
|
||||||
|
store that before we list the region that
|
||||||
|
needs it ...
|
||||||
|
*/
|
||||||
|
|
||||||
|
const SourceList& sl ((*i)->sources());
|
||||||
|
|
||||||
|
for (SourceList::const_iterator s = sl.begin(); s != sl.end(); ++s) {
|
||||||
|
nested_node->add_child_nocopy ((*s)->get_state ());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nested_node) {
|
||||||
|
node->add_child_nocopy (*nested_node);
|
||||||
|
}
|
||||||
|
|
||||||
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
|
for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) {
|
||||||
node->add_child_nocopy ((*i)->get_state());
|
node->add_child_nocopy ((*i)->get_state());
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include "ardour/playlist.h"
|
#include "ardour/playlist.h"
|
||||||
#include "ardour/playlist_source.h"
|
#include "ardour/playlist_source.h"
|
||||||
|
#include "ardour/playlist_factory.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/session_playlists.h"
|
#include "ardour/session_playlists.h"
|
||||||
#include "ardour/source_factory.h"
|
#include "ardour/source_factory.h"
|
||||||
|
|
@ -84,26 +85,38 @@ PlaylistSource::add_state (XMLNode& node)
|
||||||
node.add_property ("offset", buf);
|
node.add_property ("offset", buf);
|
||||||
snprintf (buf, sizeof (buf), "%" PRIu64, _playlist_length);
|
snprintf (buf, sizeof (buf), "%" PRIu64, _playlist_length);
|
||||||
node.add_property ("length", buf);
|
node.add_property ("length", buf);
|
||||||
|
|
||||||
|
node.add_child_nocopy (_playlist->get_state());
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
PlaylistSource::set_state (const XMLNode& node, int version)
|
PlaylistSource::set_state (const XMLNode& node, int version)
|
||||||
{
|
{
|
||||||
/* get playlist ID */
|
/* check that we have a playlist ID */
|
||||||
|
|
||||||
const XMLProperty *prop = node.property (X_("playlist"));
|
const XMLProperty *prop = node.property (X_("playlist"));
|
||||||
|
|
||||||
if (!prop) {
|
if (!prop) {
|
||||||
|
error << _("No playlist ID in PlaylistSource XML!") << endmsg;
|
||||||
throw failed_constructor ();
|
throw failed_constructor ();
|
||||||
}
|
}
|
||||||
|
|
||||||
PBD::ID id (prop->value());
|
/* create playlist from child node */
|
||||||
|
|
||||||
/* get playlist */
|
XMLNodeList nlist;
|
||||||
|
XMLNodeConstIterator niter;
|
||||||
|
|
||||||
boost::shared_ptr<Playlist> p = _session.playlists->by_id (id);
|
nlist = node.children();
|
||||||
|
|
||||||
|
for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
|
||||||
|
if ((*niter)->name() == "Playlist") {
|
||||||
|
_playlist = PlaylistFactory::create (_session, **niter, true, false);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!_playlist) {
|
if (!_playlist) {
|
||||||
|
error << _("No playlist node in PlaylistSource XML!") << endmsg;
|
||||||
throw failed_constructor ();
|
throw failed_constructor ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1056,22 +1056,25 @@ Session::state(bool full_state)
|
||||||
|
|
||||||
for (SourceMap::iterator siter = sources.begin(); siter != sources.end(); ++siter) {
|
for (SourceMap::iterator siter = sources.begin(); siter != sources.end(); ++siter) {
|
||||||
|
|
||||||
/* Don't save information about non-destructive file sources that are empty
|
/* Don't save information about non-file Sources, or
|
||||||
and unused by any regions.
|
* about non-destructive file sources that are empty
|
||||||
|
* and unused by any regions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
boost::shared_ptr<FileSource> fs;
|
boost::shared_ptr<FileSource> fs;
|
||||||
|
|
||||||
if ((fs = boost::dynamic_pointer_cast<FileSource> (siter->second)) != 0) {
|
if ((fs = boost::dynamic_pointer_cast<FileSource> (siter->second)) != 0) {
|
||||||
|
|
||||||
if (!fs->destructive()) {
|
if (!fs->destructive()) {
|
||||||
if (fs->empty() && !fs->used()) {
|
if (fs->empty() && !fs->used()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
child->add_child_nocopy (siter->second->get_state());
|
child->add_child_nocopy (siter->second->get_state());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
child = node->add_child ("Regions");
|
child = node->add_child ("Regions");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,6 +147,28 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
|
||||||
|
|
||||||
if (type == DataType::AUDIO) {
|
if (type == DataType::AUDIO) {
|
||||||
|
|
||||||
|
/* it could be nested */
|
||||||
|
|
||||||
|
if (node.property ("playlist") != 0) {
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
} catch (failed_constructor&) {
|
||||||
|
/* oh well, so much for that then ... */
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Source* src = new SndFileSource (s, node);
|
Source* src = new SndFileSource (s, node);
|
||||||
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
|
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
|
||||||
|
|
@ -184,7 +206,7 @@ SourceFactory::create (Session& s, const XMLNode& node, bool defer_peaks)
|
||||||
throw; // rethrow
|
throw; // rethrow
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else if (type == DataType::MIDI) {
|
} else if (type == DataType::MIDI) {
|
||||||
boost::shared_ptr<SMFSource> src (new SMFSource (s, node));
|
boost::shared_ptr<SMFSource> src (new SMFSource (s, node));
|
||||||
src->load_model (true, true);
|
src->load_model (true, true);
|
||||||
|
|
@ -348,9 +370,7 @@ SourceFactory::createFromPlaylist (DataType type, Session& s, boost::shared_ptr<
|
||||||
}
|
}
|
||||||
|
|
||||||
ret->check_for_analysis_data_on_disk ();
|
ret->check_for_analysis_data_on_disk ();
|
||||||
|
SourceCreated (ret);
|
||||||
/* we never announce these sources */
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue