if (_write_source) {
_write_source->set_timeline_position (position);
}
- seek(position, false);
+ seek (position, false);
}
_n_channels, input_change_pending.type)
<< endmsg;
}
-
+
if (ni == 0) {
_source_port = 0;
} else {
}
if (nominally_recording || rec_nframes) {
-
+
// Pump entire port buffer into the ring buffer (FIXME: split cycles?)
MidiBuffer& buf = _source_port->get_midi_buffer(nframes);
for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {
// << frames_written - frames_read << endl;
to_read = (framecnt_t) min ((framecnt_t) to_read, (framecnt_t) (max_framepos - file_frame));
-
+
if (read (file_frame, to_read, reversed)) {
ret = -1;
}
_write_source.reset();
}
}
-
+
mark_write_completed = true;
}
if (!_session.writable() || !recordable()) {
return 1;
}
-
+
assert(n == 0);
_write_source.reset();
{
list<boost::shared_ptr<Source> > ret;
- /* put some data on the disk, even if its just a header for an empty file.
- XXX should we not have a more direct method for doing this? Maybe not
- since we don't want to mess around with the model/disk relationship
- that the Source has to pay attention to.
- */
-
- boost::dynamic_pointer_cast<MidiSource>(_write_source)->session_saved ();
+ /* put some data on the disk, even if its just a header for an empty file */
+ boost::dynamic_pointer_cast<SMFSource> (_write_source)->ensure_disk_file ();
/* never let it go away */
_write_source->mark_nonremovable ();
return;
}
- /* XXX Not sure what, if anything we can do with MIDI
+ /* XXX Not sure what, if anything we can do with MIDI
as far as capture alignment etc.
*/
#ifndef NDEBUG
DEBUG_TRACE (DEBUG::MidiDiskstreamIO, string_compose (
- "%1 MDS pre-read read from %2 write to %3\n", _name,
+ "%1 MDS pre-read read from %2 write to %3\n", _name,
_playback_buf->get_read_ptr(), _playback_buf->get_write_ptr()));
// cerr << "================\n";
// _playback_buf->dump (cerr);