fix bypassing plugins with sidechain i/o
[ardour.git] / libs / ardour / auditioner.cc
index fe84a2d717b884bda0d980152fd9eaf20ef1597f..0c7ba0bc1c15b81c4c335ad2430df2a9d5c3485f 100644 (file)
@@ -46,7 +46,7 @@ using namespace PBD;
 #include "i18n.h"
 
 Auditioner::Auditioner (Session& s)
-       : Track (s, "auditioner", Route::Auditioner)
+       : Track (s, "auditioner", PresentationInfo::Auditioner)
        , current_frame (0)
        , _auditioning (0)
        , length (0)
@@ -85,13 +85,17 @@ Auditioner::init ()
 
 Auditioner::~Auditioner ()
 {
+       if (asynth) {
+               asynth->drop_references ();
+       }
+       asynth.reset ();
 }
 
 void
 Auditioner::lookup_synth ()
 {
        string plugin_id = Config->get_midi_audition_synth_uri();
-       asynth = boost::shared_ptr<Processor>();
+       asynth.reset ();
        if (!plugin_id.empty()) {
                boost::shared_ptr<Plugin> p;
                p = find_plugin (_session, plugin_id, ARDOUR::LV2);