diff options
author | David Robillard <d@drobilla.net> | 2011-04-16 19:02:36 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-16 19:02:36 +0000 |
commit | 1ac86ca2e5e32bd8bb34bba1589e2152004dc9a6 (patch) | |
tree | bbeed636819fc3e67e77e2645a699e01fd0d2e16 /src/AlsaDriver.cpp | |
parent | 7627989d3fbc7fd54013988d2ec7c29a5c517bbf (diff) | |
download | patchage-1ac86ca2e5e32bd8bb34bba1589e2152004dc9a6.tar.gz patchage-1ac86ca2e5e32bd8bb34bba1589e2152004dc9a6.tar.bz2 patchage-1ac86ca2e5e32bd8bb34bba1589e2152004dc9a6.zip |
Squeeze blank lines and delete trailing whitespace.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@3152 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/AlsaDriver.cpp')
-rw-r--r-- | src/AlsaDriver.cpp | 24 |
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) { |