summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/chan_count.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour/chan_count.h')
-rw-r--r--libs/ardour/ardour/chan_count.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/ardour/ardour/chan_count.h b/libs/ardour/ardour/chan_count.h
index 26e41a9bcd..35052e4aea 100644
--- a/libs/ardour/ardour/chan_count.h
+++ b/libs/ardour/ardour/chan_count.h
@@ -43,6 +43,10 @@ public:
_counts[(*t).to_index()] = 0;
}
}
+
+ // -1 is what to_index does. inlined for speed. this should maybe be changed..
+ inline size_t n_audio() const { return _counts[DataType::AUDIO-1]; }
+ inline size_t n_midi() const { return _counts[DataType::MIDI-1]; }
void set(DataType type, size_t count) { _counts[type.to_index()] = count; }
size_t get(DataType type) const { return _counts[type.to_index()]; }