/*
- Copyright (C) 2000-2006 Paul Davis
+ Copyright (C) 2000-2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
sigc::signal<void,boost::shared_ptr<Region> > RegionFactory::CheckNewRegion;
boost::shared_ptr<Region>
-RegionFactory::create (boost::shared_ptr<Region> region, nframes_t start,
- nframes_t length, const std::string& name,
+RegionFactory::create (boost::shared_ptr<Region> region, nframes_t start,
+ nframes_t length, const std::string& name,
layer_t layer, Region::Flag flags, bool announce)
{
boost::shared_ptr<const AudioRegion> other_a;
}
boost::shared_ptr<Region>
-RegionFactory::create (boost::shared_ptr<AudioRegion> region, nframes_t start,
- nframes_t length, const std::string& name,
+RegionFactory::create (boost::shared_ptr<AudioRegion> region, nframes_t start,
+ nframes_t length, const std::string& name,
layer_t layer, Region::Flag flags, bool announce)
{
return create (boost::static_pointer_cast<Region> (region), start, length, name, layer, flags, announce);
RegionFactory::create (Session& session, XMLNode& node, bool yn)
{
boost::shared_ptr<Region> r = session.XMLRegionFactory (node, yn);
- r->unlock_property_changes ();
if (r) {
+ r->unlock_property_changes ();
CheckNewRegion (r);
}
return r;
}
-
-boost::shared_ptr<Region>
+
+boost::shared_ptr<Region>
RegionFactory::create (const SourceList& srcs, nframes_t start, nframes_t length, const string& name, layer_t layer, Region::Flag flags, bool announce)
{
if (srcs.empty()) {
}
if (srcs[0]->type() == DataType::AUDIO) {
-
+
AudioRegion* ar = new AudioRegion (srcs, start, length, name, layer, flags);
boost::shared_ptr<AudioRegion> arp (ar);
boost::shared_ptr<Region> ret (boost::static_pointer_cast<Region> (arp));
return ret;
} else if (srcs[0]->type() == DataType::MIDI) {
-
+
MidiRegion* ar = new MidiRegion (srcs, start, length, name, layer, flags);
boost::shared_ptr<MidiRegion> mrp (ar);
boost::shared_ptr<Region> ret (boost::static_pointer_cast<Region> (mrp));
}
return boost::shared_ptr<Region> ();
-}
+}
-boost::shared_ptr<Region>
+boost::shared_ptr<Region>
RegionFactory::create (SourceList& srcs, const XMLNode& node)
{
if (srcs.empty()) {
return boost::shared_ptr<Region> ();
}
-boost::shared_ptr<Region>
+boost::shared_ptr<Region>
RegionFactory::create (boost::shared_ptr<Source> src, nframes_t start, nframes_t length, const string& name, layer_t layer, Region::Flag flags, bool announce)
{
boost::shared_ptr<AudioSource> as;