From 74fc799497f8b067067897d4ed73de42b49e478d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 24 Oct 2009 22:39:11 +0000 Subject: Fix needlessley explodey MidiPlaylist constructor. git-svn-id: svn://localhost/ardour2/branches/3.0@5909 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/debug.h | 5 ++-- libs/ardour/ardour/midi_playlist.h | 2 +- libs/ardour/midi_playlist.cc | 47 ++++---------------------------------- 3 files changed, 8 insertions(+), 46 deletions(-) (limited to 'libs/ardour') diff --git a/libs/ardour/ardour/debug.h b/libs/ardour/ardour/debug.h index 7fe51388fb..b151c5fdea 100644 --- a/libs/ardour/ardour/debug.h +++ b/libs/ardour/ardour/debug.h @@ -31,12 +31,13 @@ namespace ARDOUR { namespace DEBUG { /* this namespace is so that we can write DEBUG::bit_name */ - + enum DebugBits { MidiSourceIO = 0x1, MidiPlaylistIO = 0x2 }; - } + } + } #ifndef NDEBUG diff --git a/libs/ardour/ardour/midi_playlist.h b/libs/ardour/ardour/midi_playlist.h index 6d617ad0f0..8328247832 100644 --- a/libs/ardour/ardour/midi_playlist.h +++ b/libs/ardour/ardour/midi_playlist.h @@ -1,6 +1,6 @@ /* Copyright (C) 2006 Paul Davis - Written by Dave Robillard, 2006 + Written by Dave Robillard, 2006 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 diff --git a/libs/ardour/midi_playlist.cc b/libs/ardour/midi_playlist.cc index d02079c715..f09a62119d 100644 --- a/libs/ardour/midi_playlist.cc +++ b/libs/ardour/midi_playlist.cc @@ -44,8 +44,8 @@ using namespace sigc; using namespace std; MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden) - : Playlist (session, node, DataType::MIDI, hidden) - , _note_mode(Sustained) + : Playlist (session, node, DataType::MIDI, hidden) + , _note_mode(Sustained) { const XMLProperty* prop = node.property("type"); assert(prop && DataType(prop->value()) == DataType::MIDI); @@ -56,52 +56,13 @@ MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden) } MidiPlaylist::MidiPlaylist (Session& session, string name, bool hidden) - : Playlist (session, name, DataType::MIDI, hidden) + : Playlist (session, name, DataType::MIDI, hidden) { } MidiPlaylist::MidiPlaylist (boost::shared_ptr other, string name, bool hidden) - : Playlist (other, name, hidden) + : Playlist (other, name, hidden) { - throw; // nope - - /* - list::const_iterator in_o = other.regions.begin(); - list::iterator in_n = regions.begin(); - - while (in_o != other.regions.end()) { - MidiRegion *ar = dynamic_cast( (*in_o) ); - - for (list::const_iterator xfades = other._crossfades.begin(); xfades != other._crossfades.end(); ++xfades) { - if ( &(*xfades)->in() == ar) { - // We found one! Now copy it! - - list::const_iterator out_o = other.regions.begin(); - list::const_iterator out_n = regions.begin(); - - while (out_o != other.regions.end()) { - - MidiRegion *ar2 = dynamic_cast( (*out_o) ); - - if ( &(*xfades)->out() == ar2) { - MidiRegion *in = dynamic_cast( (*in_n) ); - MidiRegion *out = dynamic_cast( (*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 other, nframes_t start, nframes_t dur, string name, bool hidden) -- cgit v1.2.3