Fix needlessley explodey MidiPlaylist constructor.

git-svn-id: svn://localhost/ardour2/branches/3.0@5909 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
David Robillard 2009-10-24 22:39:11 +00:00
parent 31416ab7b1
commit 74fc799497
3 changed files with 8 additions and 46 deletions

View File

@ -37,6 +37,7 @@ namespace ARDOUR {
MidiPlaylistIO = 0x2
};
}
}
#ifndef NDEBUG

View File

@ -63,45 +63,6 @@ MidiPlaylist::MidiPlaylist (Session& session, string name, bool hidden)
MidiPlaylist::MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, string name, bool hidden)
: Playlist (other, name, hidden)
{
throw; // nope
/*
list<Region*>::const_iterator in_o = other.regions.begin();
list<Region*>::iterator in_n = regions.begin();
while (in_o != other.regions.end()) {
MidiRegion *ar = dynamic_cast<MidiRegion *>( (*in_o) );
for (list<Crossfade *>::const_iterator xfades = other._crossfades.begin(); xfades != other._crossfades.end(); ++xfades) {
if ( &(*xfades)->in() == ar) {
// We found one! Now copy it!
list<Region*>::const_iterator out_o = other.regions.begin();
list<Region*>::const_iterator out_n = regions.begin();
while (out_o != other.regions.end()) {
MidiRegion *ar2 = dynamic_cast<MidiRegion *>( (*out_o) );
if ( &(*xfades)->out() == ar2) {
MidiRegion *in = dynamic_cast<MidiRegion*>( (*in_n) );
MidiRegion *out = dynamic_cast<MidiRegion*>( (*out_n) );
Crossfade *new_fade = new Crossfade( *(*xfades), in, out);
add_crossfade(*new_fade);
break;
}
out_o++;
out_n++;
}
// cerr << "HUH!? second region in the crossfade not found!" << endl;
}
}
in_o++;
in_n++;
}
*/
}
MidiPlaylist::MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, nframes_t start, nframes_t dur, string name, bool hidden)