mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Relax export preparation timeout
This increases timeout granularity and ensure that rt (TSFM) and butler thread can run to prepare exports. This may fix an issue some windows users reported "Cannot prepare transport for export", and increasing the buffersize to 1024 or 2048 works around the isssue. This also fixes an edge-case usecs_per_cycle() may return -1 (sleep forever) when the engine dies.
This commit is contained in:
parent
fe99dd4ec2
commit
32c7b18f6d
1 changed files with 4 additions and 2 deletions
|
|
@ -140,9 +140,11 @@ Session::start_audio_export (samplepos_t position, bool realtime, bool region_ex
|
|||
* to wait for it to wake up and call
|
||||
* non_realtime_stop ().
|
||||
*/
|
||||
int timeout = std::max (10, (int)(8 * nominal_sample_rate () / get_block_size ()));
|
||||
int sleeptm = std::max (40000, engine().usecs_per_cycle ());
|
||||
int timeout = std::max (100, 8000000 / sleeptm);
|
||||
do {
|
||||
Glib::usleep (engine().usecs_per_cycle ());
|
||||
Glib::usleep (sleeptm);
|
||||
sched_yield ();
|
||||
} while (_transport_fsm->waiting_for_butler() && --timeout > 0);
|
||||
|
||||
if (timeout == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue