// here we check the types as well void connect(SourceBase& source, SinkBase& sink) { try { // NB: source needs to connect to sink first to have a ReaderID as soon as possible. // this is a requirement for ProxyConnectors E_DEBUG(EConnectors, "Connecting " << source.fullName() << " to " << sink.fullName()); source.connect(sink); sink.connect(source); } catch (EssentiaException& e) { std::ostringstream msg; msg << "While connecting " << source.fullName() << " to " << sink.fullName() << ":\n" << e.what(); throw EssentiaException(msg); } }