permit different sizes for audio playback & capture buffers
[ardour.git] / libs / ardour / midi_playlist.cc
index 8c94bb1a7fe0fd0958816e4f89327c999a94514a..89b59147533c677a6c064532d0e284cdaea6640c 100644 (file)
@@ -39,6 +39,7 @@
 #include "i18n.h"
 
 using namespace ARDOUR;
+using namespace PBD;
 using namespace std;
 
 MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden)
@@ -55,16 +56,19 @@ MidiPlaylist::MidiPlaylist (Session& session, const XMLNode& node, bool hidden)
 
 MidiPlaylist::MidiPlaylist (Session& session, string name, bool hidden)
        : Playlist (session, name, DataType::MIDI, hidden)
+       , _note_mode(Sustained)
 {
 }
 
 MidiPlaylist::MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, string name, bool hidden)
        : Playlist (other, name, hidden)
+       , _note_mode(other->_note_mode)
 {
 }
 
 MidiPlaylist::MidiPlaylist (boost::shared_ptr<const MidiPlaylist> other, nframes_t start, nframes_t dur, string name, bool hidden)
-               : Playlist (other, start, dur, name, hidden)
+       : Playlist (other, start, dur, name, hidden)
+       , _note_mode(other->_note_mode)
 {
        /* this constructor does NOT notify others (session) */
 }
@@ -159,11 +163,11 @@ MidiPlaylist::read (MidiRingBuffer<nframes_t>& dst, nframes_t start, nframes_t d
                                DEBUG_TRACE (DEBUG::MidiPlaylistIO, "\tBEFORE: new tracker\n");
                        } else {
                                tracker = t->second;
-                               DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\tBEFORE: tracker says there are %1 on notes", tracker->on()));
+                               DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\tBEFORE: tracker says there are %1 on notes\n", tracker->on()));
                        }
 
                        mr->read_at (dst, start, dur, chan_n, _note_mode, tracker);
-                       DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\tAFTER: tracker says there are %1 on notes", tracker->on()));
+                       DEBUG_TRACE (DEBUG::MidiPlaylistIO, string_compose ("\tAFTER: tracker says there are %1 on notes\n", tracker->on()));
 
                        if (new_tracker) {
                                pair<Region*,MidiStateTracker*> newpair;