Merge branch 'windows' of git.ardour.org:ardour/ardour into windows
[ardour.git] / libs / ardour / return.cc
index 8433f7de0881aab113c3a3c827ca9971762336e9..4f9e8b958a4aad86db00df92f50d4fd9e3133dfb 100644 (file)
 #include "pbd/xml++.h"
 
 #include "ardour/amp.h"
-#include "ardour/audio_port.h"
+#include "ardour/audioengine.h"
 #include "ardour/buffer_set.h"
 #include "ardour/io.h"
 #include "ardour/meter.h"
-#include "ardour/panner.h"
-#include "ardour/port.h"
 #include "ardour/return.h"
 #include "ardour/session.h"
-#include "ardour/mute_master.h"
-#include "ardour/audioengine.h"
 
 #include "i18n.h"
 
@@ -54,18 +50,7 @@ Return::Return (Session& s, bool internal)
        /* never muted */
 
        _amp.reset (new Amp (_session));
-       _meter.reset (new PeakMeter (_session));
-}
-
-Return::Return (Session& s, const std::string& name, uint32_t bslot, bool internal)
-       : IOProcessor (s, (internal ? false : true), false, name)
-       , _metering (false)
-       , _bitslot (bslot)
-{
-       /* never muted */
-
-       _amp.reset (new Amp (_session));
-       _meter.reset (new PeakMeter (_session));
+       _meter.reset (new PeakMeter (_session, name()));
 }
 
 Return::~Return ()
@@ -151,7 +136,7 @@ Return::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pfra
 }
 
 bool
-Return::can_support_io_configuration (const ChanCount& in, ChanCount& out) const
+Return::can_support_io_configuration (const ChanCount& in, ChanCount& out)
 {
        out = in + _input->n_ports();
        return true;
@@ -166,7 +151,7 @@ Return::configure_io (ChanCount in, ChanCount out)
 
        // Ensure there are enough buffers (since we add some)
        if (_session.get_scratch_buffers(in).count() < out) {
-               Glib::Mutex::Lock em (_session.engine().process_lock());
+               Glib::Threads::Mutex::Lock em (_session.engine().process_lock());
                IO::PortCountChanged(out);
        }
 
@@ -175,15 +160,3 @@ Return::configure_io (ChanCount in, ChanCount out)
        return true;
 }
 
-/** Set up the XML description of a return so that we will not
- *  reset its name or bitslot during ::set_state()
- *  @param state XML return state.
- */
-void
-Return::make_unique (XMLNode &state)
-{
-       state.add_property ("ignore-bitslot", "1");
-       state.add_property ("ignore-name", "1");
-}
-
-