summaryrefslogtreecommitdiffstats
path: root/src/AlsaDriver.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-03 22:24:22 +0000
committerDavid Robillard <d@drobilla.net>2006-10-03 22:24:22 +0000
commit9c7f679baa39d7772f9b66a65b48d37ba540fbba (patch)
treee5c543bafdd65b43cd96d2320b8abe7e37d9ee6d /src/AlsaDriver.cpp
parent960edd8f434bd6bedb6f635bc3cedeae9dbbb1e0 (diff)
downloadpatchage-9c7f679baa39d7772f9b66a65b48d37ba540fbba.tar.gz
patchage-9c7f679baa39d7772f9b66a65b48d37ba540fbba.tar.bz2
patchage-9c7f679baa39d7772f9b66a65b48d37ba540fbba.zip
shared_ptr bugfixes.
Updated Ingen to work with new FlowCanvas. Updated Patchage to work with new(er) FlowCanvas. git-svn-id: http://svn.drobilla.net/lad/patchage@152 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/AlsaDriver.cpp')
-rw-r--r--src/AlsaDriver.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp
index 43ee297..f868af9 100644
--- a/src/AlsaDriver.cpp
+++ b/src/AlsaDriver.cpp
@@ -33,7 +33,6 @@ using namespace LibFlowCanvas;
AlsaDriver::AlsaDriver(Patchage* app)
: m_app(app),
- m_canvas(app->canvas()),
m_seq(NULL)
{
}
@@ -180,7 +179,7 @@ AlsaDriver::refresh_ports()
// Application input/output ports go on the same module
if (!split) {
- m = m_canvas->find_module(client_name, InputOutput);
+ m = m_app->canvas()->find_module(client_name, InputOutput);
if (!m) {
m = boost::shared_ptr<PatchageModule>(new PatchageModule(m_app, client_name, InputOutput));
m->load_location();
@@ -207,10 +206,10 @@ AlsaDriver::refresh_ports()
else type = Output;
// See if an InputOutput module exists (maybe with Jack ports on it)
- m = m_canvas->find_module(client_name, InputOutput);
+ m = m_app->canvas()->find_module(client_name, InputOutput);
if (!m)
- m = m_canvas->find_module(client_name, type);
+ m = m_app->canvas()->find_module(client_name, type);
if (!m) {
m = boost::shared_ptr<PatchageModule>(
@@ -225,10 +224,10 @@ AlsaDriver::refresh_ports()
type = Input;
// See if an InputOutput module exists (maybe with Jack ports on it)
- m = m_canvas->find_module(client_name, InputOutput);
+ m = m_app->canvas()->find_module(client_name, InputOutput);
if (!m)
- m = m_canvas->find_module(client_name, type);
+ m = m_app->canvas()->find_module(client_name, type);
if (!m) {
m = boost::shared_ptr<PatchageModule>(
@@ -245,10 +244,10 @@ AlsaDriver::refresh_ports()
type = Output;
// See if an InputOutput module exists (maybe with Jack ports on it)
- m = m_canvas->find_module(client_name, InputOutput);
+ m = m_app->canvas()->find_module(client_name, InputOutput);
if (!m)
- m = m_canvas->find_module(client_name, type);
+ m = m_app->canvas()->find_module(client_name, type);
if (!m) {
m = boost::shared_ptr<PatchageModule>(
@@ -279,8 +278,8 @@ AlsaDriver::refresh_connections()
boost::shared_ptr<PatchageModule> m;
boost::shared_ptr<PatchagePort> p;
- for (ModuleMap::iterator i = m_canvas->modules().begin();
- i != m_canvas->modules().end(); ++i) {
+ for (ModuleMap::iterator i = m_app->canvas()->modules().begin();
+ i != m_app->canvas()->modules().end(); ++i) {
m = boost::dynamic_pointer_cast<PatchageModule>((*i).second);
if (m) {
for (PortVector::const_iterator j = m->ports().begin(); j != m->ports().end(); ++j) {
@@ -317,14 +316,14 @@ AlsaDriver::add_connections(boost::shared_ptr<PatchagePort> port)
while(!snd_seq_query_port_subscribers(m_seq, subsinfo)) {
const snd_seq_addr_t* connected_addr = snd_seq_query_subscribe_get_addr(subsinfo);
- connected_port = m_canvas->find_port(connected_addr);
+ connected_port = m_app->canvas()->find_port(connected_addr);
if (connected_port) {
- boost::shared_ptr<Connection> existing = m_canvas->get_connection(port, connected_port);
+ boost::shared_ptr<Connection> existing = m_app->canvas()->get_connection(port, connected_port);
if (existing) {
existing->set_flagged(false);
} else {
- m_canvas->add_connection(port, connected_port);
+ m_app->canvas()->add_connection(port, connected_port);
}
}