: _name (inport_name)
, _flags (inflags)
{
- _capture_latency_range.min =
- _capture_latency_range.max =
- _playback_latency_range.min =
+ _capture_latency_range.min =
+ _capture_latency_range.max =
+ _playback_latency_range.min =
_playback_latency_range.max = 0;
}
WavesDataPort::~WavesDataPort ()
{
- disconnect_all ();
+ _disconnect_all ();
}
if (this == port) {
std::cerr << "WavesDataPort::connect (): attempt to connect port to itself!" << std::endl;
- return -1;
+ return -1;
}
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;
}
void WavesDataPort::_disconnect (WavesDataPort *port, bool api_call)
{
std::vector<WavesDataPort*>::iterator it = std::find (_connections.begin (), _connections.end (), port);
-
+
if (it != _connections.end ()) { // actually, it's supposed to be always true.
_connections.erase (it);
}
port->_disconnect (this, false);
}
- if (is_input() && _connections.empty())
- {
+ if (is_input() && _connections.empty()) {
_wipe_buffer();
}
}
void WavesDataPort::disconnect_all ()
+{
+ _disconnect_all ();
+
+ if (is_input()) {
+ _wipe_buffer();
+ }
+}
+
+void WavesDataPort::_disconnect_all ()
{
while (!_connections.empty ()) {
_connections.back ()->_disconnect (this, false);
}
}
-
bool WavesDataPort::is_physically_connected () const
{
for (std::vector<WavesDataPort*>::const_iterator it = _connections.begin (); it != _connections.end (); ++it) {