Keep track of capture duration
This commit is contained in:
parent
3b96c28310
commit
d5a105e777
|
@ -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);
|
||||
|
|
|
@ -1876,6 +1876,8 @@ Session::xrun_recovery ()
|
|||
Xrun (_transport_sample); /* EMIT SIGNAL */
|
||||
|
||||
if (actively_recording ()) {
|
||||
++_capture_xruns;
|
||||
|
||||
if (Config->get_stop_recording_on_xrun()) {
|
||||
|
||||
/* it didn't actually halt, but we need
|
||||
|
|
Loading…
Reference in New Issue