diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2019-09-26 18:39:46 -0600 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2019-09-26 18:39:56 -0600 |
commit | 903c3ec5a0491b3e504a81bddeb7fe7c429e2a7e (patch) | |
tree | f91f07edb33d89cfd195ec691969e21c1e49d429 /libs/ardour/ardour/buffer_set.h | |
parent | f5f452bf9c9637063a819a69980456767ea5da59 (diff) |
rename BufferSet::get* to BufferSet::get_available*
This tries to make it clear what the BufferSet limit semantics really are
Diffstat (limited to 'libs/ardour/ardour/buffer_set.h')
-rw-r--r-- | libs/ardour/ardour/buffer_set.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 5808358173..4c92849843 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -97,23 +97,23 @@ public: size_t buffer_capacity(DataType type) const; - Buffer& get(DataType type, size_t i); - const Buffer& get(DataType type, size_t i) const; - AudioBuffer& get_audio(size_t i) { - return (AudioBuffer&)get(DataType::AUDIO, i); + return (AudioBuffer&)get_available (DataType::AUDIO, i); } const AudioBuffer& get_audio(size_t i) const { - return (const AudioBuffer&)get(DataType::AUDIO, i); + return (const AudioBuffer&)get_available(DataType::AUDIO, i); } MidiBuffer& get_midi(size_t i) { - return (MidiBuffer&)get(DataType::MIDI, i); + return (MidiBuffer&)get_available(DataType::MIDI, i); } const MidiBuffer& get_midi(size_t i) const { - return (const MidiBuffer&)get(DataType::MIDI, i); + return (const MidiBuffer&)get_available(DataType::MIDI, i); } + Buffer& get_available(DataType type, size_t i); + const Buffer& get_available(DataType type, size_t i) const; + #ifdef LV2_SUPPORT /** Get a MIDI buffer translated into an LV2 MIDI buffer for use with * plugins. The index here corresponds directly to MIDI buffer numbers @@ -144,8 +144,8 @@ public: template <typename BS, typename B> class iterator_base { public: - B& operator*() { return (B&)_set.get(_type, _index); } - B* operator->() { return &(B&)_set.get(_type, _index); } + B& operator*() { return (B&)_set.get_available(_type, _index); } + B* operator->() { return &(B&)_set.get_available(_type, _index); } iterator_base<BS,B>& operator++() { ++_index; return *this; } // yes, prefix only bool operator==(const iterator_base<BS,B>& other) { return (_index == other._index); } bool operator!=(const iterator_base<BS,B>& other) { return (_index != other._index); } |