mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 00:56:33 +01:00
Remove unused punch+preroll API
This API was not used, also superseded by record w/preroll.
This commit is contained in:
parent
33811b51b2
commit
ccedb2d44e
7 changed files with 7 additions and 59 deletions
|
|
@ -1011,13 +1011,9 @@ public:
|
|||
/* preroll */
|
||||
samplecnt_t preroll_samples (samplepos_t) const;
|
||||
|
||||
void request_preroll_record_punch (samplepos_t start, samplecnt_t preroll);
|
||||
void request_preroll_record_trim (samplepos_t start, samplecnt_t preroll);
|
||||
void request_count_in_record ();
|
||||
|
||||
samplepos_t preroll_record_punch_pos () const { return _preroll_record_punch_pos; }
|
||||
bool preroll_record_punch_enabled () const { return _preroll_record_punch_pos >= 0; }
|
||||
|
||||
samplecnt_t preroll_record_trim_len () const { return _preroll_record_trim_len; }
|
||||
|
||||
/* temporary hacks to allow selection to be pushed from GUI into backend.
|
||||
|
|
@ -1945,10 +1941,8 @@ private:
|
|||
Evoral::Range<samplepos_t> _range_selection;
|
||||
Evoral::Range<samplepos_t> _object_selection;
|
||||
|
||||
void unset_preroll_record_punch ();
|
||||
void unset_preroll_record_trim ();
|
||||
|
||||
samplepos_t _preroll_record_punch_pos;
|
||||
samplecnt_t _preroll_record_trim_len;
|
||||
bool _count_in_once;
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ public:
|
|||
SetLoop,
|
||||
PunchIn,
|
||||
PunchOut,
|
||||
RecordStart,
|
||||
RangeStop,
|
||||
RangeLocate,
|
||||
Overwrite,
|
||||
|
|
|
|||
|
|
@ -400,7 +400,7 @@ DiskWriter::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
|
|||
get_location_times (loop_loc, &loop_start, &loop_end, &loop_length);
|
||||
}
|
||||
|
||||
if (nominally_recording || (re && was_recording && _session.get_record_enabled() && (_session.config.get_punch_in() || _session.preroll_record_punch_enabled()))) {
|
||||
if (nominally_recording || (re && was_recording && _session.get_record_enabled() && _session.config.get_punch_in ())) {
|
||||
|
||||
Evoral::OverlapType ot = Evoral::coverage (first_recordable_sample, last_recordable_sample, start_sample, end_sample);
|
||||
// XXX should this be transport_sample + nframes - 1 ? coverage() expects its parameter ranges to include their end points
|
||||
|
|
|
|||
|
|
@ -5977,7 +5977,7 @@ Route::monitoring_state () const
|
|||
* rg: I suspect this is not the case: monitoring may differ
|
||||
*/
|
||||
|
||||
if (_session.config.get_punch_in() || _session.config.get_punch_out() || _session.preroll_record_punch_enabled ()) {
|
||||
if (_session.config.get_punch_in() || _session.config.get_punch_out()) {
|
||||
session_rec = _session.actively_recording ();
|
||||
} else {
|
||||
session_rec = _session.get_record_enabled();
|
||||
|
|
|
|||
|
|
@ -311,7 +311,6 @@ Session::Session (AudioEngine &eng,
|
|||
, _play_range (false)
|
||||
, _range_selection (-1,-1)
|
||||
, _object_selection (-1,-1)
|
||||
, _preroll_record_punch_pos (-1)
|
||||
, _preroll_record_trim_len (0)
|
||||
, _count_in_once (false)
|
||||
, main_outs (0)
|
||||
|
|
@ -851,7 +850,6 @@ Session::destroy ()
|
|||
case SessionEvent::Skip:
|
||||
case SessionEvent::PunchIn:
|
||||
case SessionEvent::PunchOut:
|
||||
case SessionEvent::RecordStart:
|
||||
case SessionEvent::StopOnce:
|
||||
case SessionEvent::RangeStop:
|
||||
case SessionEvent::RangeLocate:
|
||||
|
|
@ -2158,7 +2156,7 @@ Session::maybe_enable_record (bool rt_context)
|
|||
}
|
||||
|
||||
if (_transport_speed) {
|
||||
if (!config.get_punch_in() && !preroll_record_punch_enabled ()) {
|
||||
if (!config.get_punch_in()) {
|
||||
enable_record ();
|
||||
}
|
||||
} else {
|
||||
|
|
@ -3416,7 +3414,7 @@ Session::new_route_from_template (uint32_t how_many, PresentationInfo::order_t i
|
|||
}
|
||||
|
||||
/* set this name in the XML description that we are about to use */
|
||||
|
||||
#warning fixme -- no more Diskstream
|
||||
if (pd == CopyPlaylist) {
|
||||
XMLNode* ds_node = find_named_node (node_copy, "Diskstream");
|
||||
if (ds_node) {
|
||||
|
|
|
|||
|
|
@ -1146,7 +1146,7 @@ Session::process_event (SessionEvent* ev)
|
|||
|
||||
case SessionEvent::PunchIn:
|
||||
// cerr << "PunchIN at " << transport_sample() << endl;
|
||||
if (config.get_punch_in() && record_status() == Enabled && !preroll_record_punch_enabled()) {
|
||||
if (config.get_punch_in() && record_status() == Enabled) {
|
||||
enable_record ();
|
||||
}
|
||||
remove = false;
|
||||
|
|
@ -1155,21 +1155,13 @@ Session::process_event (SessionEvent* ev)
|
|||
|
||||
case SessionEvent::PunchOut:
|
||||
// cerr << "PunchOUT at " << transport_sample() << endl;
|
||||
if (config.get_punch_out() && !preroll_record_punch_enabled()) {
|
||||
if (config.get_punch_out()) {
|
||||
step_back_from_record ();
|
||||
}
|
||||
remove = false;
|
||||
del = false;
|
||||
break;
|
||||
|
||||
case SessionEvent::RecordStart:
|
||||
if (preroll_record_punch_enabled() && record_status() == Enabled) {
|
||||
enable_record ();
|
||||
}
|
||||
remove = false;
|
||||
del = false;
|
||||
break;
|
||||
|
||||
case SessionEvent::StopOnce:
|
||||
if (!non_realtime_work_pending()) {
|
||||
_clear_event_type (SessionEvent::StopOnce);
|
||||
|
|
@ -1260,10 +1252,6 @@ Session::compute_stop_limit () const
|
|||
return max_samplepos;
|
||||
}
|
||||
|
||||
if (preroll_record_punch_enabled ()) {
|
||||
return max_samplepos;
|
||||
}
|
||||
|
||||
bool const punching_in = (config.get_punch_in () && _locations->auto_punch_location());
|
||||
bool const punching_out = (config.get_punch_out () && _locations->auto_punch_location());
|
||||
|
||||
|
|
|
|||
|
|
@ -148,49 +148,18 @@ Session::force_locate (samplepos_t target_sample, bool with_roll)
|
|||
queue_event (ev);
|
||||
}
|
||||
|
||||
void
|
||||
Session::unset_preroll_record_punch ()
|
||||
{
|
||||
if (_preroll_record_punch_pos >= 0) {
|
||||
remove_event (_preroll_record_punch_pos, SessionEvent::RecordStart);
|
||||
}
|
||||
_preroll_record_punch_pos = -1;
|
||||
}
|
||||
|
||||
void
|
||||
Session::unset_preroll_record_trim ()
|
||||
{
|
||||
_preroll_record_trim_len = 0;
|
||||
}
|
||||
|
||||
void
|
||||
Session::request_preroll_record_punch (samplepos_t rec_in, samplecnt_t preroll)
|
||||
{
|
||||
if (actively_recording ()) {
|
||||
return;
|
||||
}
|
||||
unset_preroll_record_punch ();
|
||||
unset_preroll_record_trim ();
|
||||
samplepos_t start = std::max ((samplepos_t)0, rec_in - preroll);
|
||||
|
||||
_preroll_record_punch_pos = rec_in;
|
||||
if (_preroll_record_punch_pos >= 0) {
|
||||
replace_event (SessionEvent::RecordStart, _preroll_record_punch_pos);
|
||||
config.set_punch_in (false);
|
||||
config.set_punch_out (false);
|
||||
}
|
||||
maybe_enable_record ();
|
||||
request_locate (start, true);
|
||||
set_requested_return_sample (rec_in);
|
||||
}
|
||||
|
||||
void
|
||||
Session::request_preroll_record_trim (samplepos_t rec_in, samplecnt_t preroll)
|
||||
{
|
||||
if (actively_recording ()) {
|
||||
return;
|
||||
}
|
||||
unset_preroll_record_punch ();
|
||||
unset_preroll_record_trim ();
|
||||
|
||||
config.set_punch_in (false);
|
||||
|
|
@ -1679,7 +1648,7 @@ Session::start_transport ()
|
|||
|
||||
switch (record_status()) {
|
||||
case Enabled:
|
||||
if (!config.get_punch_in() && !preroll_record_punch_enabled()) {
|
||||
if (!config.get_punch_in()) {
|
||||
enable_record ();
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue