From 2aae9799e1d96d827ad156aeafa549deabd51e5d Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 27 Jan 2019 17:02:40 +0100 Subject: Re-instate instrument v1.0 support. --- src/instrument.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/instrument.h') 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 #include +#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 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 samplelist; -- cgit v1.2.3