mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Keep track of capture duration
This commit is contained in:
parent
d65d4046ff
commit
ad25dd0437
4 changed files with 25 additions and 7 deletions
|
|
@ -303,6 +303,9 @@ public:
|
|||
|
||||
bool have_captured() const { return _have_captured; }
|
||||
|
||||
samplecnt_t capture_duration () const { return _capture_duration; }
|
||||
unsigned int capture_xruns () const { return _capture_xruns; }
|
||||
|
||||
void refill_all_track_buffers ();
|
||||
Butler* butler() { return _butler; }
|
||||
void butler_transport_work (bool have_process_lock = false);
|
||||
|
|
@ -1370,6 +1373,8 @@ private:
|
|||
samplecnt_t _worst_route_latency;
|
||||
uint32_t _send_latency_changes;
|
||||
bool _have_captured;
|
||||
samplecnt_t _capture_duration;
|
||||
unsigned int _capture_xruns;
|
||||
bool _non_soloed_outs_muted;
|
||||
bool _listening;
|
||||
uint32_t _listen_cnt;
|
||||
|
|
|
|||
|
|
@ -208,6 +208,8 @@ Session::Session (AudioEngine &eng,
|
|||
, _worst_route_latency (0)
|
||||
, _send_latency_changes (0)
|
||||
, _have_captured (false)
|
||||
, _capture_duration (0)
|
||||
, _capture_xruns (0)
|
||||
, _non_soloed_outs_muted (false)
|
||||
, _listening (false)
|
||||
, _listen_cnt (0)
|
||||
|
|
@ -1890,6 +1892,9 @@ Session::enable_record ()
|
|||
set_track_monitor_input_status (true);
|
||||
}
|
||||
|
||||
_capture_duration = 0;
|
||||
_capture_xruns = 0;
|
||||
|
||||
RecordStateChanged ();
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,6 +216,10 @@ Session::process_routes (pframes_t nframes, bool& need_butler)
|
|||
const samplepos_t start_sample = _transport_sample;
|
||||
const samplepos_t end_sample = _transport_sample + floor (nframes * _transport_speed);
|
||||
|
||||
if (actively_recording ()) {
|
||||
_capture_duration += nframes;
|
||||
}
|
||||
|
||||
VCAList v = _vca_manager->vcas ();
|
||||
for (VCAList::const_iterator i = v.begin(); i != v.end(); ++i) {
|
||||
(*i)->automation_run (start_sample, nframes);
|
||||
|
|
|
|||
|
|
@ -1875,7 +1875,10 @@ Session::xrun_recovery ()
|
|||
|
||||
Xrun (_transport_sample); /* EMIT SIGNAL */
|
||||
|
||||
if (Config->get_stop_recording_on_xrun() && actively_recording()) {
|
||||
if (actively_recording ()) {
|
||||
++_capture_xruns;
|
||||
|
||||
if (Config->get_stop_recording_on_xrun()) {
|
||||
|
||||
/* it didn't actually halt, but we need
|
||||
* to handle things in the same way.
|
||||
|
|
@ -1887,6 +1890,7 @@ Session::xrun_recovery ()
|
|||
_transport_fsm->start ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
Session::route_processors_changed (RouteProcessorChange c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue