#include "ardour/midiport_manager.h"
#include "ardour/port_manager.h"
#include "ardour/profile.h"
+#include "ardour/session.h"
#include "i18n.h"
PortManager::get_physical_outputs (DataType type, std::vector<std::string>& s)
{
if (!_backend) {
+ s.clear ();
return;
}
_backend->get_physical_outputs (type, s);
PortManager::get_physical_inputs (DataType type, std::vector<std::string>& s)
{
if (!_backend) {
+ s.clear ();
return;
}
return _backend->connected (handle);
}
+bool
+PortManager::physically_connected (const string& port_name)
+{
+ if (!_backend) {
+ return false;
+ }
+
+ PortEngine::PortHandle handle = _backend->get_port_by_name (port_name);
+
+ if (!handle) {
+ return false;
+ }
+
+ return _backend->physically_connected (handle);
+}
+
+int
+PortManager::get_connections (const string& port_name, std::vector<std::string>& s)
+{
+ if (!_backend) {
+ s.clear ();
+ return 0;
+ }
+
+ PortEngine::PortHandle handle = _backend->get_port_by_name (port_name);
+
+ if (!handle) {
+ s.clear ();
+ return 0;
+ }
+
+ return _backend->get_connections (handle, s);
+}
+
int
PortManager::connect (const string& source, const string& destination)
{
}
void
-PortManager::silence (pframes_t nframes)
+PortManager::silence (pframes_t nframes, Session *s)
{
for (Ports::iterator i = _cycle_ports->begin(); i != _cycle_ports->end(); ++i) {
+ if (s && i->second == s->mtc_output_port ()) {
+ continue;
+ }
+ if (s && i->second == s->midi_clock_output_port ()) {
+ continue;
+ }
+ if (s && i->second == s->ltc_output_port ()) {
+ continue;
+ }
if (i->second->sends_output()) {
i->second->get_buffer(nframes).silence(nframes);
}