diff options
author | David Robillard <d@drobilla.net> | 2007-07-28 07:09:21 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-07-28 07:09:21 +0000 |
commit | 6e167cb1a835cb0b44990cc4c2b2a47db9dd2b9e (patch) | |
tree | e31d6aac9c2ca21a46f18a24822b47c2003aee4c /libs/ardour/midi_track.cc | |
parent | 71452634a711cfeae4cf7eb9fbe7667210a071f1 (diff) |
Playback from MIDI model, playback of clicked-in events.
Note the diskstream chunk size affects reading of clicked-in, so you may need to seek away and back again to have new events read (this will be fixed).
git-svn-id: svn://localhost/ardour2/trunk@2183 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_track.cc')
-rw-r--r-- | libs/ardour/midi_track.cc | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc index 3d7c429075..55d195fab0 100644 --- a/libs/ardour/midi_track.cc +++ b/libs/ardour/midi_track.cc @@ -167,7 +167,7 @@ MidiTrack::_set_state (const XMLNode& node, bool call_base) if ((prop = node.property (X_("note-mode"))) != 0) { _note_mode = NoteMode (string_2_enum (prop->value(), _note_mode)); } else { - _note_mode = Note; + _note_mode = Sustained; } if ((prop = node.property ("diskstream-id")) == 0) { @@ -569,7 +569,6 @@ MidiTrack::process_output_buffers (BufferSet& bufs, MidiBuffer& output_buf = bufs.get_midi(0); write_controller_messages(output_buf, start_frame, end_frame, nframes, offset); - deliver_output(bufs, start_frame, end_frame, nframes, offset); } } @@ -685,26 +684,13 @@ MidiTrack::unfreeze () _freeze_record.state = UnFrozen; FreezeChange (); /* EMIT SIGNAL */ } -#if 0 -int -MidiTrack::set_mode (TrackMode m) -{ - assert(_diskstream); - - if (m != _mode) { - - if (_diskstream->set_destructive (m == Destructive)) { - return -1; - } - _mode = m; - - TrackModeChanged (); /* EMIT SIGNAL */ - } - - return 0; +void +MidiTrack::set_note_mode (NoteMode m) +{ + _note_mode = m; + midi_diskstream()->set_note_mode(m); } -#endif /** \return true on success, false on failure (no buffer space left) */ |