summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/buffer_set.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-06-29 06:58:07 +0000
committerDavid Robillard <d@drobilla.net>2007-06-29 06:58:07 +0000
commiteb296b2c957f574334fae2aefd8b863cf7631769 (patch)
tree57a546f8c61a81b7088b23b9fcd92a5b9d578e9f /libs/ardour/ardour/buffer_set.h
parent44867662a3d020e042714d1c5e948b8c3afea941 (diff)
Reduce overhead of multi-type-ness (last Summer's SoC):
Use uint32_t instead of size_t counts (halves size of ChanCount on 64-bit). Shift DataType values down to eliminate subtraction every index of a ChanCount or *Set. Allow using DataType directly as an array index (prettier/terser). Fix some mixed spaces/tabs in file comment headers. git-svn-id: svn://localhost/ardour2/trunk@2082 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/buffer_set.h')
-rw-r--r--libs/ardour/ardour/buffer_set.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h
index 2e0f604ace..c750615798 100644
--- a/libs/ardour/ardour/buffer_set.h
+++ b/libs/ardour/ardour/buffer_set.h
@@ -71,7 +71,7 @@ public:
Buffer& get(DataType type, size_t i)
{
assert(i <= _count.get(type));
- return *_buffers[type.to_index()][i];
+ return *_buffers[type][i];
}
AudioBuffer& get_audio(size_t i)
@@ -140,7 +140,7 @@ public:
private:
typedef std::vector<Buffer*> BufferVec;
- /// Vector of vectors, indexed by DataType::to_index()
+ /// Vector of vectors, indexed by DataType
std::vector<BufferVec> _buffers;
/// Use counts (there may be more actual buffers than this)