- /* basic MidiRegion constructor */
-
- sources.push_back (&src);
- master_sources.push_back (&src);
- src.GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
-
- save_state ("initial state");
-
- if (announce) {
- CheckNewRegion (this); /* EMIT SIGNAL */
- }
-}
-
-MidiRegion::MidiRegion (MidiSource& src, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t layer, Flag flags, bool announce)
- : Region (start, length, name, layer, flags)
-{
- /* basic MidiRegion constructor */
-
- sources.push_back (&src);
- master_sources.push_back (&src);
- src.GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
-
- save_state ("initial state");
-
- if (announce) {
- CheckNewRegion (this); /* EMIT SIGNAL */
- }
-}
-
-MidiRegion::MidiRegion (SourceList& srcs, jack_nframes_t start, jack_nframes_t length, const string& name, layer_t layer, Flag flags, bool announce)
- : Region (start, length, name, layer, flags)
-{
- /* basic MidiRegion constructor */
-#if 0
- for (SourceList::iterator i=srcs.begin(); i != srcs.end(); ++i) {
- sources.push_back (*i);
- master_sources.push_back (*i);
- (*i)->GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
- }
-
-{
- /* create a new MidiRegion, that is part of an existing one */
-
- set<MidiSource*> unique_srcs;
-
- for (SourceList::const_iterator i= other.sources.begin(); i != other.sources.end(); ++i) {
- sources.push_back (*i);
- (*i)->GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
- unique_srcs.insert (*i);
- }
-
- for (SourceList::const_iterator i = other.master_sources.begin(); i != other.master_sources.end(); ++i) {
- if (unique_srcs.find (*i) == unique_srcs.end()) {
- (*i)->GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
- }
- master_sources.push_back (*i);
- }
-
- save_state ("initial state");
-
- if (announce) {
- CheckNewRegion (this); /* EMIT SIGNAL */
- }
-#endif
-}
-
-MidiRegion::MidiRegion (const MidiRegion &other)
- : Region (other)
-{
- /* Pure copy constructor */
-
- set<MidiSource*> unique_srcs;
-
- for (SourceList::const_iterator i = other.sources.begin(); i != other.sources.end(); ++i) {
- sources.push_back (*i);
- (*i)->GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
- unique_srcs.insert (*i);
- }
-
- for (SourceList::const_iterator i = other.master_sources.begin(); i != other.master_sources.end(); ++i) {
- master_sources.push_back (*i);
- if (unique_srcs.find (*i) == unique_srcs.end()) {
- (*i)->GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
- }
- }
-
- save_state ("initial state");
-
- /* NOTE: no CheckNewRegion signal emitted here. This is the copy constructor */
-}
-
-MidiRegion::MidiRegion (MidiSource& src, const XMLNode& node)
- : Region (node)
-{
- sources.push_back (&src);
- master_sources.push_back (&src);
- src.GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
-
- if (set_state (node)) {
- throw failed_constructor();
- }
-
- save_state ("initial state");
-
- CheckNewRegion (this); /* EMIT SIGNAL */
-}
-
-MidiRegion::MidiRegion (SourceList& srcs, const XMLNode& node)
- : Region (node)
-{
- /* basic MidiRegion constructor */
-
- set<MidiSource*> unique_srcs;
-
- for (SourceList::iterator i=srcs.begin(); i != srcs.end(); ++i) {
- sources.push_back (*i);
- (*i)->GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
- unique_srcs.insert (*i);
- }
-
- for (SourceList::iterator i = srcs.begin(); i != srcs.end(); ++i) {
- master_sources.push_back (*i);
- if (unique_srcs.find (*i) == unique_srcs.end()) {
- (*i)->GoingAway.connect (mem_fun (*this, &MidiRegion::source_deleted));
- }
- }
-
- if (set_state (node)) {
- throw failed_constructor();
- }
-
- save_state ("initial state");
-
- CheckNewRegion (this); /* EMIT SIGNAL */