align stem-export (raw track outputs (with and w/p processing)
This commit is contained in:
parent
7c13a16589
commit
0a52b325f4
@ -20,14 +20,16 @@
|
||||
#ifndef __ardour_capturing_processor_h__
|
||||
#define __ardour_capturing_processor_h__
|
||||
|
||||
#include "ardour/fixed_delay.h"
|
||||
#include "ardour/processor.h"
|
||||
#include "ardour/types.h"
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
class LIBARDOUR_API CapturingProcessor : public Processor
|
||||
{
|
||||
public:
|
||||
CapturingProcessor (Session & session);
|
||||
CapturingProcessor (Session & session, framecnt_t latency);
|
||||
~CapturingProcessor();
|
||||
|
||||
public: // main interface
|
||||
@ -47,6 +49,8 @@ class LIBARDOUR_API CapturingProcessor : public Processor
|
||||
|
||||
framecnt_t block_size;
|
||||
BufferSet capture_buffers;
|
||||
FixedDelay _delaybuffers;
|
||||
framecnt_t _latency;
|
||||
};
|
||||
|
||||
} // namespace ARDOUR
|
||||
|
@ -26,9 +26,10 @@
|
||||
|
||||
namespace ARDOUR {
|
||||
|
||||
CapturingProcessor::CapturingProcessor (Session & session)
|
||||
CapturingProcessor::CapturingProcessor (Session & session, framecnt_t latency)
|
||||
: Processor (session, X_("capture point"))
|
||||
, block_size (AudioEngine::instance()->samples_per_cycle())
|
||||
, _latency (latency)
|
||||
{
|
||||
realloc_buffers ();
|
||||
}
|
||||
@ -48,8 +49,14 @@ CapturingProcessor::set_block_size (pframes_t nframes)
|
||||
void
|
||||
CapturingProcessor::run (BufferSet& bufs, framepos_t, framepos_t, double, pframes_t nframes, bool)
|
||||
{
|
||||
if (active()) {
|
||||
capture_buffers.read_from (bufs, nframes);
|
||||
if (!active()) {
|
||||
_delaybuffers.flush ();
|
||||
return;
|
||||
}
|
||||
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
|
||||
for (uint32_t b = 0; b < bufs.count().get (*t); ++b) {
|
||||
_delaybuffers.delay (*t, b, capture_buffers.get (*t, b), bufs.get (*t, b), nframes, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,6 +64,7 @@ bool
|
||||
CapturingProcessor::configure_io (ChanCount in, ChanCount out)
|
||||
{
|
||||
Processor::configure_io (in, out);
|
||||
_delaybuffers.set (out, _latency);
|
||||
realloc_buffers();
|
||||
return true;
|
||||
}
|
||||
@ -72,6 +80,7 @@ void
|
||||
CapturingProcessor::realloc_buffers()
|
||||
{
|
||||
capture_buffers.ensure_buffers (_configured_input, block_size);
|
||||
_delaybuffers.flush ();
|
||||
}
|
||||
|
||||
XMLNode &
|
||||
|
@ -3716,7 +3716,9 @@ Route::add_export_point()
|
||||
Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
|
||||
Glib::Threads::RWLock::WriterLock lw (_processor_lock);
|
||||
|
||||
_capturing_processor.reset (new CapturingProcessor (_session));
|
||||
// this aligns all tracks; but not tracks + busses
|
||||
assert (_session.worst_track_latency () >= _initial_delay);
|
||||
_capturing_processor.reset (new CapturingProcessor (_session, _session.worst_track_latency () - _initial_delay));
|
||||
_capturing_processor->activate ();
|
||||
|
||||
configure_processors_unlocked (0, &lw);
|
||||
|
Loading…
Reference in New Issue
Block a user