summaryrefslogtreecommitdiff
path: root/src/instrument.cc
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2019-03-06 09:54:29 +0100
committerAndré Nusser <andre.nusser@googlemail.com>2019-05-11 14:54:51 +0200
commita673a209a71b06488df3244903b5b4b7f994451d (patch)
tree61403df77a0916d52ec1631b515422bfd1082f92 /src/instrument.cc
parent1965889ac953b354763f194cd7ec44932942477d (diff)
Split sample selection into own class.
Diffstat (limited to 'src/instrument.cc')
-rw-r--r--src/instrument.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/instrument.cc b/src/instrument.cc
index ffc928d..b7bcdd9 100644
--- a/src/instrument.cc
+++ b/src/instrument.cc
@@ -33,7 +33,7 @@
Instrument::Instrument(Settings& settings, Random& rand)
: settings(settings)
, rand(rand)
- , powerlist(rand, settings)
+ , sample_selection(settings, rand, powerlist)
{
DEBUG(instrument, "new %p\n", this);
mod = 1.0;
@@ -59,7 +59,7 @@ const Sample* Instrument::sample(level_t level, size_t pos)
if(version >= VersionStr("2.0"))
{
// Version 2.0
- return powerlist.get(level * mod, pos);
+ return sample_selection.get(level * mod, pos);
}
else
{
@@ -91,6 +91,7 @@ void Instrument::finalise()
}
powerlist.finalise();
+ sample_selection.finalise();
}
}