mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-11 17:16:38 +01:00
Make sure CapturingProcessors write a type to their state node so that they can be reloaded without a crash.
git-svn-id: svn://localhost/ardour2/branches/3.0@9006 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
35ea412280
commit
cda09a0878
3 changed files with 13 additions and 2 deletions
|
|
@ -39,6 +39,7 @@ class CapturingProcessor : public Processor
|
||||||
void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool result_required);
|
void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool result_required);
|
||||||
bool configure_io (ChanCount in, ChanCount out);
|
bool configure_io (ChanCount in, ChanCount out);
|
||||||
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const;
|
||||||
|
virtual XMLNode& state (bool);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@
|
||||||
namespace ARDOUR {
|
namespace ARDOUR {
|
||||||
|
|
||||||
CapturingProcessor::CapturingProcessor (Session & session)
|
CapturingProcessor::CapturingProcessor (Session & session)
|
||||||
: Processor (session, X_("capture point"))
|
: Processor (session, X_("capture point"))
|
||||||
, block_size (session.engine().frames_per_cycle())
|
, block_size (session.engine().frames_per_cycle())
|
||||||
{
|
{
|
||||||
realloc_buffers ();
|
realloc_buffers ();
|
||||||
}
|
}
|
||||||
|
|
@ -72,4 +72,12 @@ CapturingProcessor::realloc_buffers()
|
||||||
capture_buffers.ensure_buffers (_configured_input, block_size);
|
capture_buffers.ensure_buffers (_configured_input, block_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XMLNode &
|
||||||
|
CapturingProcessor::state (bool full)
|
||||||
|
{
|
||||||
|
XMLNode& node = Processor::state (full);
|
||||||
|
|
||||||
|
node.add_property (X_("type"), X_("capture"));
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace ARDOUR
|
} // namespace ARDOUR
|
||||||
|
|
|
||||||
|
|
@ -2348,6 +2348,8 @@ Route::set_processor_state (const XMLNode& node)
|
||||||
must_configure = true;
|
must_configure = true;
|
||||||
}
|
}
|
||||||
_monitor_control->set_state (**niter, Stateful::current_state_version);
|
_monitor_control->set_state (**niter, Stateful::current_state_version);
|
||||||
|
} else if (prop->value() == "capture") {
|
||||||
|
_capturing_processor.reset (new CapturingProcessor (_session));
|
||||||
} else {
|
} else {
|
||||||
ProcessorList::iterator o;
|
ProcessorList::iterator o;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue