FaderPort::~FaderPort ()
{
+ all_lights_out ();
+
if (_input_port) {
DEBUG_TRACE (DEBUG::FaderPort, string_compose ("unregistering input port %1\n", boost::shared_ptr<ARDOUR::Port>(_input_port)->name()));
AudioEngine::instance()->unregister_port (_input_port);
}
if (_output_port) {
-// _output_port->drain (10000); //ToDo: is this necessary? It hangs the shutdown, for me
+ _output_port->drain (10000, 250000); /* check every 10 msecs, wait up to 1/4 second for the port to drain */
DEBUG_TRACE (DEBUG::FaderPort, string_compose ("unregistering output port %1\n", boost::shared_ptr<ARDOUR::Port>(_output_port)->name()));
AudioEngine::instance()->unregister_port (_output_port);
_output_port.reset ();