diff options
Diffstat (limited to 'libs/backends/wavesaudio/waves_dataport.cc')
-rw-r--r-- | libs/backends/wavesaudio/waves_dataport.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libs/backends/wavesaudio/waves_dataport.cc b/libs/backends/wavesaudio/waves_dataport.cc index d1dacc90eb..b5485ac2b3 100644 --- a/libs/backends/wavesaudio/waves_dataport.cc +++ b/libs/backends/wavesaudio/waves_dataport.cc @@ -35,7 +35,7 @@ WavesDataPort::WavesDataPort (const std::string& inport_name, PortFlags inflags) WavesDataPort::~WavesDataPort () { - disconnect_all (); + _disconnect_all (); } @@ -67,7 +67,7 @@ int WavesDataPort::connect (WavesDataPort *port) } if (is_connected (port)) { - std::cerr << "WavesDataPort::connect (): the ports are already connected!" << std::endl; + // std::cerr << "WavesDataPort::connect (): the ports are already connected!" << std::endl; return -1; } @@ -115,8 +115,7 @@ void WavesDataPort::_disconnect (WavesDataPort *port, bool api_call) port->_disconnect (this, false); } - if (is_input() && _connections.empty()) - { + if (is_input() && _connections.empty()) { _wipe_buffer(); } } @@ -124,13 +123,21 @@ void WavesDataPort::_disconnect (WavesDataPort *port, bool api_call) void WavesDataPort::disconnect_all () { + _disconnect_all (); + + if (is_input()) { + _wipe_buffer(); + } +} + +void WavesDataPort::_disconnect_all () +{ while (!_connections.empty ()) { _connections.back ()->_disconnect (this, false); _connections.pop_back (); } } - bool WavesDataPort::is_physically_connected () const { for (std::vector<WavesDataPort*>::const_iterator it = _connections.begin (); it != _connections.end (); ++it) { |