#include "ardour/midi_playlist.h"
#include "ardour/playlist_factory.h"
-#include "i18n.h"
+#include "pbd/i18n.h"
using namespace std;
using namespace ARDOUR;
boost::shared_ptr<Playlist>
PlaylistFactory::create (Session& s, const XMLNode& node, bool hidden, bool unused)
{
- const XMLProperty* type = node.property("type");
+ XMLProperty const * type = node.property("type");
boost::shared_ptr<Playlist> pl;
} else if (type->value() == "midi") {
pl = boost::shared_ptr<Playlist> (new MidiPlaylist (s, node, hidden));
}
-
+
pl->set_region_ownership ();
-
+
if (pl && !hidden) {
PlaylistCreated (pl, unused);
}
pl = boost::shared_ptr<Playlist> (new AudioPlaylist (s, name, hidden));
else if (type == DataType::MIDI)
pl = boost::shared_ptr<Playlist> (new MidiPlaylist (s, name, hidden));
-
+
if (pl && !hidden) {
PlaylistCreated (pl, false);
}
-
+
return pl;
} catch (...) {
return boost::shared_ptr<Playlist> ();
boost::shared_ptr<Playlist> pl;
boost::shared_ptr<const AudioPlaylist> apl;
boost::shared_ptr<const MidiPlaylist> mpl;
-
+
try {
if ((apl = boost::dynamic_pointer_cast<const AudioPlaylist> (old)) != 0) {
if (pl && !hidden) {
PlaylistCreated (pl, false);
}
-
+
return pl;
} catch (...) {
return boost::shared_ptr<Playlist> ();
}
-
+
}
boost::shared_ptr<Playlist>
pl = boost::shared_ptr<Playlist> (new MidiPlaylist (mpl, start, cnt, name, hidden));
pl->set_region_ownership ();
}
-
+
/* this factory method does NOT notify others */
-
+
return pl;
} catch (...) {
return boost::shared_ptr<Playlist> ();