summaryrefslogtreecommitdiffstats
path: root/src/AlsaDriver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/AlsaDriver.cpp')
-rw-r--r--src/AlsaDriver.cpp24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/AlsaDriver.cpp b/src/AlsaDriver.cpp
index 6cb51ae..35f41fa 100644
--- a/src/AlsaDriver.cpp
+++ b/src/AlsaDriver.cpp
@@ -37,13 +37,11 @@ AlsaDriver::AlsaDriver(Patchage* app)
{
}
-
AlsaDriver::~AlsaDriver()
{
detach();
}
-
/** Attach to ALSA.
* @a launch_daemon is ignored, as ALSA has no daemon to launch/connect to.
*/
@@ -71,7 +69,6 @@ AlsaDriver::attach(bool /*launch_daemon*/)
}
}
-
void
AlsaDriver::detach()
{
@@ -85,7 +82,6 @@ AlsaDriver::detach()
}
}
-
/** Refresh all Alsa Midi ports and connections.
*/
void
@@ -100,7 +96,6 @@ AlsaDriver::refresh()
refresh_connections();
}
-
boost::shared_ptr<PatchagePort>
AlsaDriver::create_port_view(Patchage* patchage,
const PortID& id)
@@ -111,7 +106,6 @@ AlsaDriver::create_port_view(Patchage* patchage,
return port;
}
-
boost::shared_ptr<PatchageModule>
AlsaDriver::find_or_create_module(
Patchage* patchage,
@@ -128,7 +122,6 @@ AlsaDriver::find_or_create_module(
return m;
}
-
void
AlsaDriver::create_port_view_internal(
Patchage* patchage,
@@ -217,7 +210,6 @@ AlsaDriver::create_port_view_internal(
}
}
-
boost::shared_ptr<PatchagePort>
AlsaDriver::create_port(boost::shared_ptr<PatchageModule> parent,
const string& name, bool is_input, snd_seq_addr_t addr)
@@ -225,7 +217,7 @@ AlsaDriver::create_port(boost::shared_ptr<PatchageModule> parent,
boost::shared_ptr<PatchagePort> ret(
new PatchagePort(parent, ALSA_MIDI, name, is_input,
_app->state_manager()->get_port_color(ALSA_MIDI)));
-
+
boost::shared_ptr<PatchageCanvas> canvas
= boost::dynamic_pointer_cast<PatchageCanvas>(parent->canvas().lock());
if (canvas)
@@ -235,7 +227,6 @@ AlsaDriver::create_port(boost::shared_ptr<PatchageModule> parent,
return ret;
}
-
bool
AlsaDriver::ignore(const snd_seq_addr_t& addr, bool add)
{
@@ -258,7 +249,7 @@ AlsaDriver::ignore(const snd_seq_addr_t& addr, bool add)
const int type = snd_seq_port_info_get_type(pinfo);
const int caps = snd_seq_port_info_get_capability(pinfo);
-
+
if (caps & SND_SEQ_PORT_CAP_NO_EXPORT) {
_ignored.insert(addr);
return true;
@@ -277,7 +268,6 @@ AlsaDriver::ignore(const snd_seq_addr_t& addr, bool add)
return false;
}
-
/** Refresh all Alsa Midi ports.
*/
void
@@ -312,7 +302,6 @@ AlsaDriver::refresh_ports()
}
}
-
/** Refresh all Alsa Midi connections.
*/
void
@@ -337,7 +326,6 @@ AlsaDriver::refresh_connections()
}
}
-
/** Add all connections for the given port.
*/
void
@@ -375,7 +363,6 @@ AlsaDriver::add_connections(boost::shared_ptr<PatchagePort> port)
}
-
/** Connects two Alsa Midi ports.
*
* \return Whether connection succeeded.
@@ -420,7 +407,6 @@ AlsaDriver::connect(boost::shared_ptr<PatchagePort> src_port, boost::shared_ptr<
return (!result);
}
-
/** Disconnects two Alsa Midi ports.
*
* \return Whether disconnection succeeded.
@@ -457,7 +443,6 @@ AlsaDriver::disconnect(boost::shared_ptr<PatchagePort> src_port, boost::shared_p
return true;
}
-
bool
AlsaDriver::create_refresh_port()
{
@@ -488,7 +473,6 @@ AlsaDriver::create_refresh_port()
return true;
}
-
void*
AlsaDriver::refresh_main(void* me)
{
@@ -497,7 +481,6 @@ AlsaDriver::refresh_main(void* me)
return NULL;
}
-
void
AlsaDriver::_refresh_main()
{
@@ -518,7 +501,7 @@ AlsaDriver::_refresh_main()
snd_seq_event_t* ev;
while (snd_seq_event_input(_seq, &ev) > 0) {
assert(ev);
-
+
Glib::Mutex::Lock lock(_events_mutex);
switch (ev->type) {
@@ -564,7 +547,6 @@ AlsaDriver::_refresh_main()
}
}
-
void
AlsaDriver::process_events(Patchage* app)
{