Metering::Meter.connect_same_thread (*this, (boost::bind (&Route::meter, this)));
{
- /* run a configure so that the invisible processors get set up */
- Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
configure_processors (0);
}
framepos_t start_frame, framepos_t end_frame, pframes_t nframes,
int declick, bool gain_automation_ok)
{
+ Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK);
+ assert(lm.locked());
+
/* figure out if we're going to use gain automation */
if (gain_automation_ok) {
_amp->set_gain_automation_buffer (_session.gain_automation_buffer ());
}
{
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
ProcessorState pstate (this);
- Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
boost::shared_ptr<PluginInsert> pi;
boost::shared_ptr<PortInsert> porti;
}
{
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
ProcessorState pstate (this);
- Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
for (ProcessorList::const_iterator i = others.begin(); i != others.end(); ++i) {
}
{
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
ProcessorList new_list;
ProcessorStreams err;
}
_processors = new_list;
-
- {
- Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
- configure_processors_unlocked (&err); // this can't fail
- }
+ configure_processors_unlocked (&err); // this can't fail
}
processor_max_streams.reset();
}
int
-Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStreams* err, bool need_process_lock)
+Route::remove_processor (boost::shared_ptr<Processor> processor, ProcessorStreams* err, bool)
{
// TODO once the export point can be configured properly, do something smarter here
if (processor == _capturing_processor) {
processor_max_streams.reset();
{
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
ProcessorState pstate (this);
return 1;
}
- if (need_process_lock) {
- Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-
- if (configure_processors_unlocked (err)) {
- pstate.restore ();
- /* we know this will work, because it worked before :) */
- configure_processors_unlocked (0);
- return -1;
- }
- } else {
- if (configure_processors_unlocked (err)) {
- pstate.restore ();
- /* we know this will work, because it worked before :) */
- configure_processors_unlocked (0);
- return -1;
- }
+ if (configure_processors_unlocked (err)) {
+ pstate.restore ();
+ /* we know this will work, because it worked before :) */
+ configure_processors_unlocked (0);
+ return -1;
}
_have_internal_generator = false;
processor_max_streams.reset();
{
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
ProcessorState pstate (this);
_output->set_user_latency (0);
- {
- Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-
- if (configure_processors_unlocked (err)) {
- pstate.restore ();
- /* we know this will work, because it worked before :) */
- configure_processors_unlocked (0);
- return -1;
- }
+ if (configure_processors_unlocked (err)) {
+ pstate.restore ();
+ /* we know this will work, because it worked before :) */
+ configure_processors_unlocked (0);
+ return -1;
}
+ //lx.unlock();
_have_internal_generator = false;
/* reconfigure I/O -- re-initialize panner modules */
{
- Glib::Threads::RWLock::WriterLock lm (_processor_lock);
Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
+ Glib::Threads::RWLock::WriterLock lm (_processor_lock);
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p) {
boost::shared_ptr<Delivery> dl;
*/
{
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
ProcessorState pstate (this);
/* If the meter is in a custom position, find it and make a rough note of its position */
maybe_note_meter_position ();
- {
- Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-
- if (configure_processors_unlocked (err)) {
- pstate.restore ();
- return -1;
- }
+ if (configure_processors_unlocked (err)) {
+ pstate.restore ();
+ return -1;
}
}
}
{
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
_processors = new_order;
if (must_configure) {
- Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
configure_processors_unlocked (0);
}
Route::listen_position_changed ()
{
{
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
ProcessorState pstate (this);
- {
- Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
-
- if (configure_processors_unlocked (0)) {
- pstate.restore ();
- configure_processors_unlocked (0); // it worked before we tried to add it ...
- return;
- }
+ if (configure_processors_unlocked (0)) {
+ pstate.restore ();
+ configure_processors_unlocked (0); // it worked before we tried to add it ...
+ return;
}
}
_capturing_processor.reset (new CapturingProcessor (_session));
_capturing_processor->activate ();
- {
- Glib::Threads::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
- configure_processors (0);
- }
+ configure_processors (0);
}
boost::shared_ptr<Processor>
Route::the_instrument () const
{
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
return the_instrument_unlocked ();
}
}
{
+ //Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
Glib::Threads::RWLock::WriterLock lm (_processor_lock);
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {