Add a scratch buffer for automation.
Useful as temporary buffer: This allows a controllable to get a master's automation-curve and combine it with its own (gain, trim, send) automation buffer.
This commit is contained in:
@@ -51,6 +51,7 @@ public:
|
||||
static gain_t* gain_automation_buffer ();
|
||||
static gain_t* trim_automation_buffer ();
|
||||
static gain_t* send_gain_automation_buffer ();
|
||||
static gain_t* scratch_automation_buffer ();
|
||||
static pan_t** pan_automation_buffer ();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -1034,6 +1034,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop
|
||||
gain_t* gain_automation_buffer () const;
|
||||
gain_t* trim_automation_buffer () const;
|
||||
gain_t* send_gain_automation_buffer () const;
|
||||
gain_t* scratch_automation_buffer () const;
|
||||
pan_t** pan_automation_buffer () const;
|
||||
|
||||
void ensure_buffer_set (BufferSet& buffers, const ChanCount& howmany);
|
||||
|
||||
@@ -45,6 +45,7 @@ public:
|
||||
gain_t* gain_automation_buffer;
|
||||
gain_t* trim_automation_buffer;
|
||||
gain_t* send_gain_automation_buffer;
|
||||
gain_t* scratch_automation_buffer;
|
||||
pan_t** pan_automation_buffer;
|
||||
uint32_t npan_buffers;
|
||||
|
||||
|
||||
@@ -208,6 +208,17 @@ ProcessThread::send_gain_automation_buffer()
|
||||
return g;
|
||||
}
|
||||
|
||||
gain_t*
|
||||
ProcessThread::scratch_automation_buffer()
|
||||
{
|
||||
ThreadBuffers* tb = _private_thread_buffers.get();
|
||||
assert (tb);
|
||||
|
||||
gain_t* g = tb->scratch_automation_buffer;
|
||||
assert (g);
|
||||
return g;
|
||||
}
|
||||
|
||||
pan_t**
|
||||
ProcessThread::pan_automation_buffer()
|
||||
{
|
||||
|
||||
@@ -6301,6 +6301,12 @@ Session::send_gain_automation_buffer() const
|
||||
return ProcessThread::send_gain_automation_buffer ();
|
||||
}
|
||||
|
||||
gain_t*
|
||||
Session::scratch_automation_buffer() const
|
||||
{
|
||||
return ProcessThread::scratch_automation_buffer ();
|
||||
}
|
||||
|
||||
pan_t**
|
||||
Session::pan_automation_buffer() const
|
||||
{
|
||||
|
||||
@@ -36,6 +36,7 @@ ThreadBuffers::ThreadBuffers ()
|
||||
, gain_automation_buffer (0)
|
||||
, trim_automation_buffer (0)
|
||||
, send_gain_automation_buffer (0)
|
||||
, scratch_automation_buffer (0)
|
||||
, pan_automation_buffer (0)
|
||||
, npan_buffers (0)
|
||||
{
|
||||
@@ -86,6 +87,8 @@ ThreadBuffers::ensure_buffers (ChanCount howmany, size_t custom)
|
||||
trim_automation_buffer = new gain_t[audio_buffer_size];
|
||||
delete [] send_gain_automation_buffer;
|
||||
send_gain_automation_buffer = new gain_t[audio_buffer_size];
|
||||
delete [] scratch_automation_buffer;
|
||||
scratch_automation_buffer = new gain_t[audio_buffer_size];
|
||||
|
||||
allocate_pan_automation_buffers (audio_buffer_size, howmany.n_audio(), false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user