diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-01-27 17:02:40 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2019-01-27 17:02:40 +0100 |
commit | 2aae9799e1d96d827ad156aeafa549deabd51e5d (patch) | |
tree | 707fb2798cd3b9304fc4af690b557efc9d98a1a8 /src/instrument.h | |
parent | 053b723adf3948d18f025efed9450d837359edd9 (diff) |
Re-instate instrument v1.0 support.
Diffstat (limited to 'src/instrument.h')
-rw-r--r-- | src/instrument.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/instrument.h b/src/instrument.h index ff33d6e..6e59681 100644 --- a/src/instrument.h +++ b/src/instrument.h @@ -31,6 +31,7 @@ #include <memory> #include <deque> +#include "rangemap.h" // for v1.0 kits #include "powerlist.h" #include "sample.h" @@ -45,7 +46,7 @@ public: Instrument(Settings& settings, Random& rand); ~Instrument(); - Sample* sample(level_t level, size_t pos); + const Sample* sample(level_t level, size_t pos); const std::string& getName() const; const std::string& getDescription() const; @@ -84,7 +85,9 @@ private: VersionStr version; - void addSample(level_t a, level_t b, Sample* s); + RangeMap<level_t, const Sample*> samples; + + void addSample(level_t a, level_t b, const Sample* s); void finalise(); ///< Signal instrument that no more samples will be added. std::vector<Sample*> samplelist; |