mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-21 04:45:58 +01:00
more rational handling of silence when (a) running freeze/export/bounce (b) during sync start
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4864 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
94d0bad82f
commit
22b3c2de96
3 changed files with 16 additions and 14 deletions
|
|
@ -1065,7 +1065,11 @@ class Session : public PBD::StatefulDestructible
|
|||
void process_with_events (nframes_t);
|
||||
void process_audition (nframes_t);
|
||||
int process_export (nframes_t, ARDOUR::AudioExportSpecification*);
|
||||
|
||||
|
||||
void block_processing() { g_atomic_int_set (&processing_prohibited, 1); }
|
||||
void unblock_processing() { g_atomic_int_set (&processing_prohibited, 0); }
|
||||
bool processing_blocked() const { return g_atomic_int_get (&processing_prohibited); }
|
||||
|
||||
/* slave tracking */
|
||||
|
||||
static const int delta_accumulator_size = 25;
|
||||
|
|
|
|||
|
|
@ -4135,7 +4135,9 @@ Session::write_one_audio_track (AudioTrack& track, nframes_t start, nframes_t en
|
|||
// any bigger than this seems to cause stack overflows in called functions
|
||||
const nframes_t chunk_size = (128 * 1024)/4;
|
||||
|
||||
g_atomic_int_set (&processing_prohibited, 1);
|
||||
// block all process callback handling
|
||||
|
||||
block_processing ();
|
||||
|
||||
/* call tree *MUST* hold route_lock */
|
||||
|
||||
|
|
@ -4270,7 +4272,7 @@ Session::write_one_audio_track (AudioTrack& track, nframes_t start, nframes_t en
|
|||
free (*i);
|
||||
}
|
||||
|
||||
g_atomic_int_set (&processing_prohibited, 0);
|
||||
unblock_processing ();
|
||||
|
||||
itt.done = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,12 +47,17 @@ Session::process (nframes_t nframes)
|
|||
{
|
||||
_silent = false;
|
||||
|
||||
if (processing_blocked()) {
|
||||
_silent = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (non_realtime_work_pending()) {
|
||||
if (!transport_work_requested ()) {
|
||||
post_transport ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
(this->*process_function) (nframes);
|
||||
|
||||
{
|
||||
|
|
@ -82,13 +87,6 @@ Session::no_roll (nframes_t nframes, nframes_t offset)
|
|||
_click_io->silence (nframes, offset);
|
||||
}
|
||||
|
||||
if (g_atomic_int_get (&processing_prohibited)) {
|
||||
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
|
||||
(*i)->silence (nframes, offset);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (RouteList::iterator i = r->begin(); i != r->end(); ++i) {
|
||||
|
||||
if ((*i)->hidden()) {
|
||||
|
|
@ -866,9 +864,7 @@ Session::maybe_sync_start (nframes_t& nframes, nframes_t& offset)
|
|||
with any fancy stuff here, just the minimal silence.
|
||||
*/
|
||||
|
||||
g_atomic_int_inc (&processing_prohibited);
|
||||
no_roll (nframes, 0);
|
||||
g_atomic_int_dec_and_test (&processing_prohibited);
|
||||
_silent = true;
|
||||
|
||||
if (Config->get_locate_while_waiting_for_sync()) {
|
||||
if (micro_locate (nframes)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue