int add_channel_to (boost::shared_ptr<ChannelList>, uint32_t how_many);
int remove_channel_from (boost::shared_ptr<ChannelList>, uint32_t how_many);
- framecnt_t playback_distance;
};
} // namespace ARDOUR
: Diskstream(sess, name, flag)
, deprecated_io_node(NULL)
, channels (new ChannelList)
- , playback_distance (0)
{
/* prevent any write sources from being created */
: Diskstream(sess, node)
, deprecated_io_node(NULL)
, channels (new ChannelList)
- , playback_distance (0)
{
in_set_state = true;
init ();
bool nominally_recording;
bool re = record_enabled ();
+ playback_distance = 0;
+
check_record_status (transport_frame, can_record);
nominally_recording = (can_record && re);
}
if (rec_nframes) {
+
/* data will be written to disk */
+
+ if (rec_nframes == nframes && rec_offset == 0) {
+ playback_distance = nframes;
+ }
+
adjust_capture_position = rec_nframes;
+
+ } else if (nominally_recording) {
+
+ /* XXXX do this for MIDI !!!
+ can't do actual capture yet - waiting for latency effects to finish before we start
+ */
+
+ playback_distance = nframes;
+
+ } else {
+
+ /* XXX: should be doing varispeed stuff here, similar to the code in AudioDiskstream::process */
+
+ playback_distance = nframes;
+
}
-
+
ret = 0;
if (commit (nframes)) {
bool need_butler = false;
if (_actual_speed < 0.0) {
- playback_sample -= nframes;
+ playback_sample -= playback_distance;
} else {
- playback_sample += nframes;
+ playback_sample += playback_distance;
}
if (adjust_capture_position != 0) {