summaryrefslogtreecommitdiff
path: root/src/instrument.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2019-03-17 11:44:21 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2019-03-17 11:44:21 +0100
commit5dee5069bc10ba3e190723aa68bb880183b1dc4c (patch)
tree9de9f8f3d328c7a1d62540e63ac448d3ed4dd90f /src/instrument.h
parent5eb47bed81de1326843e1e3bad41addcfed08d4e (diff)
Implemented new directed choke feature.
Diffstat (limited to 'src/instrument.h')
-rw-r--r--src/instrument.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/instrument.h b/src/instrument.h
index 125d7ab..e4cf481 100644
--- a/src/instrument.h
+++ b/src/instrument.h
@@ -40,6 +40,12 @@
#include "settings.h"
+struct Choke
+{
+ std::size_t instrument_id;
+ double choketime;
+};
+
class Instrument
{
public:
@@ -48,6 +54,7 @@ public:
const Sample* sample(level_t level, size_t pos);
+ std::size_t getID() const;
const std::string& getName() const;
const std::string& getDescription() const;
const std::string& getGroup() const;
@@ -66,6 +73,8 @@ public:
float getMaxPower() const;
float getMinPower() const;
+ const std::vector<Choke>& getChokes();
+
private:
// For unit-tests:
friend class DOMLoaderTest;
@@ -75,6 +84,7 @@ private:
void* magic;
+ std::size_t id;
std::string _group;
std::string _name;
std::string _description;
@@ -94,6 +104,8 @@ private:
Settings& settings;
Random& rand;
PowerList powerlist;
+
+ std::vector<Choke> chokes;
};
// typedef std::map< std::string, Instrument > Instruments;