Count xruns during realtime export

This commit is contained in:
Robin Gareus 2021-04-29 17:50:28 +02:00
parent 2e7b193988
commit 94d79a3809
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
4 changed files with 8 additions and 0 deletions

View file

@ -306,6 +306,7 @@ public:
samplecnt_t capture_duration () const { return _capture_duration; } samplecnt_t capture_duration () const { return _capture_duration; }
unsigned int capture_xruns () const { return _capture_xruns; } unsigned int capture_xruns () const { return _capture_xruns; }
unsigned int export_xruns () const { return _export_xruns; }
void refill_all_track_buffers (); void refill_all_track_buffers ();
Butler* butler() { return _butler; } Butler* butler() { return _butler; }
@ -1399,6 +1400,7 @@ private:
bool _have_captured; bool _have_captured;
samplecnt_t _capture_duration; samplecnt_t _capture_duration;
unsigned int _capture_xruns; unsigned int _capture_xruns;
unsigned int _export_xruns;
bool _non_soloed_outs_muted; bool _non_soloed_outs_muted;
bool _listening; bool _listening;
uint32_t _listen_cnt; uint32_t _listen_cnt;

View file

@ -207,6 +207,7 @@ Session::Session (AudioEngine &eng,
, _have_captured (false) , _have_captured (false)
, _capture_duration (0) , _capture_duration (0)
, _capture_xruns (0) , _capture_xruns (0)
, _export_xruns (0)
, _non_soloed_outs_muted (false) , _non_soloed_outs_muted (false)
, _listening (false) , _listening (false)
, _listen_cnt (0) , _listen_cnt (0)

View file

@ -95,6 +95,7 @@ Session::pre_export ()
config.set_external_sync (false); config.set_external_sync (false);
_export_xruns = 0;
_exporting = true; _exporting = true;
export_status->set_running (true); export_status->set_running (true);
export_status->Finished.connect_same_thread (*this, boost::bind (&Session::finalize_audio_export, this, _1)); export_status->Finished.connect_same_thread (*this, boost::bind (&Session::finalize_audio_export, this, _1));

View file

@ -1885,6 +1885,10 @@ Session::xrun_recovery ()
} }
} }
else if (exporting ()) {
assert (realtime_export ());
++_export_xruns;
}
} }
void void