diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-07-06 03:11:52 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-07-06 03:11:52 +0000 |
commit | 1516d52ffab61cb0e117f1829ede387e2d2eb021 (patch) | |
tree | 964442d73efa1774798501936ff9aaab8a370234 /libs/ardour/ardour/automation_event.h | |
parent | 65438f0fe4abb11ce0d039f6bbd7cd74696cae9c (diff) |
new automation interval configuration variable, to control automation snapshot time resolution (for oofus to test); patch for cancellingmulti-file import; minor code cleanups; use boost::fast_pool_allocator for automation lists (may revert later)
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2117 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/automation_event.h')
-rw-r--r-- | libs/ardour/ardour/automation_event.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libs/ardour/ardour/automation_event.h b/libs/ardour/ardour/automation_event.h index 007bad7259..7db5e3f459 100644 --- a/libs/ardour/ardour/automation_event.h +++ b/libs/ardour/ardour/automation_event.h @@ -24,6 +24,9 @@ #include <list> #include <cmath> +#include <boost/pool/pool.hpp> +#include <boost/pool/pool_alloc.hpp> + #include <sigc++/signal.h> #include <glibmm/thread.h> @@ -35,7 +38,8 @@ namespace ARDOUR { -struct ControlEvent { +class ControlEvent { + public: double when; double value; @@ -49,13 +53,21 @@ struct ControlEvent { // bool operator==(const ControlEvent& other) { // return value == other.value && when == other.when; // } - }; +/* automation lists use a pool allocator that does not use a lock and + allocates 8k of new pointers at a time +*/ + +typedef boost::fast_pool_allocator<ControlEvent, + boost::default_user_allocator_new_delete, + boost::details::pool::null_mutex, + 8192> ControlEventAllocator; + class AutomationList : public PBD::StatefulDestructible { public: - typedef std::list<ControlEvent*> AutomationEventList; + typedef std::list<ControlEvent*,ControlEventAllocator> AutomationEventList; typedef AutomationEventList::iterator iterator; typedef AutomationEventList::const_iterator const_iterator; |