summaryrefslogtreecommitdiffstats
path: root/src/server/JackDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-15 02:01:28 +0000
committerDavid Robillard <d@drobilla.net>2012-08-15 02:01:28 +0000
commit859ace60e8b1c4c0d9c5bea88d8eed1265ea859e (patch)
tree8750f85fa429dea5384bb309c8b09adfc75549e3 /src/server/JackDriver.cpp
parent68c2d72ba4e2208ff926461bb6faccfbadcf2a61 (diff)
downloadingen-859ace60e8b1c4c0d9c5bea88d8eed1265ea859e.tar.gz
ingen-859ace60e8b1c4c0d9c5bea88d8eed1265ea859e.tar.bz2
ingen-859ace60e8b1c4c0d9c5bea88d8eed1265ea859e.zip
Remove EnginePort::move() in favour of Driver::rename_port().
Remove redundant Driver::engine_port(). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4698 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/JackDriver.cpp')
-rw-r--r--src/server/JackDriver.cpp29
1 files changed, 11 insertions, 18 deletions
diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp
index 372feaa6..65566472 100644
--- a/src/server/JackDriver.cpp
+++ b/src/server/JackDriver.cpp
@@ -75,7 +75,7 @@ JackPort::create()
{
_jack_port = jack_port_register(
_driver->jack_client(),
- ingen_jack_port_name(_patch_port->path()).c_str(),
+ _patch_port->path().substr(1).c_str(),
(_patch_port->is_a(PortType::AUDIO))
? JACK_DEFAULT_AUDIO_TYPE : JACK_DEFAULT_MIDI_TYPE,
(_patch_port->is_input())
@@ -99,12 +99,6 @@ JackPort::destroy()
}
void
-JackPort::move(const Raul::Path& path)
-{
- jack_port_set_name(_jack_port, ingen_jack_port_name(path).c_str());
-}
-
-void
JackPort::pre_process(ProcessContext& context)
{
const SampleCount nframes = context.nframes();
@@ -339,6 +333,16 @@ JackDriver::remove_port(ProcessContext& context,
return NULL;
}
+void
+JackDriver::rename_port(const Raul::Path& old_path,
+ const Raul::Path& new_path)
+{
+ JackPort* jport = dynamic_cast<JackPort*>(port(old_path));
+ if (jport) {
+ jack_port_set_name(jport->jack_port(), new_path.substr(1).c_str());
+ }
+}
+
EnginePort*
JackDriver::port(const Raul::Path& path)
{
@@ -365,17 +369,6 @@ JackDriver::create_port(DuplexPort* patch_port)
}
}
-EnginePort*
-JackDriver::engine_port(ProcessContext& context,
- const Raul::Path& path)
-{
- for (Raul::List<JackPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i)
- if ((*i)->patch_port()->path() == path)
- return (*i);
-
- return NULL;
-}
-
/**** Jack Callbacks ****/
/** Jack process callback, drives entire audio thread.