From f4f74f3316b474096f164aa33c9d2e8965a545c3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Dec 2010 20:10:41 +0000 Subject: Improve performance for setups with many apps or ports. (Eliminate all linear searches for items, except one case for Jack ports which is unavoidable due to the Jack API, but is memoized, so each port will only be searched for once between refreshes). git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@2712 a436a847-0d15-0410-975c-d299462d15a1 --- src/PatchagePort.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/PatchagePort.hpp') diff --git a/src/PatchagePort.hpp b/src/PatchagePort.hpp index 80e70e4..6783434 100644 --- a/src/PatchagePort.hpp +++ b/src/PatchagePort.hpp @@ -26,6 +26,9 @@ #include "flowcanvas/Module.hpp" #include "patchage-config.h" +#include "PatchageCanvas.hpp" +#include "PortID.hpp" +#include "StateManager.hpp" #ifdef HAVE_ALSA #include @@ -33,21 +36,23 @@ using namespace FlowCanvas; -enum PortType { JACK_AUDIO, JACK_MIDI, ALSA_MIDI }; - /** A Port on a PatchageModule */ class PatchagePort : public FlowCanvas::Port { public: - PatchagePort(boost::shared_ptr module, PortType type, const std::string& name, bool is_input, int color) + PatchagePort(boost::shared_ptr module, + PortType type, + const std::string& name, + bool is_input, + uint32_t color) : Port(module, name, is_input, color) , _type(type) { #ifdef HAVE_ALSA _alsa_addr.client = '\0'; - _alsa_addr.port = '\0'; + _alsa_addr.port = '\0'; #endif } -- cgit v1.2.1