summaryrefslogtreecommitdiff
path: root/src/instrument.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-09-20 22:23:23 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-09-20 22:23:23 +0200
commit73f1a400608d93742e57c7ea3c4433eb1a2e1852 (patch)
treeeb6b500127e095e5bad124927054dc73f44814dc /src/instrument.cc
parent3d0ed93889afb5ae739d2998e33178689c2de965 (diff)
New resample feature (greatly inspired by Cédric 'SxDx') based on libsamplerate.
Diffstat (limited to 'src/instrument.cc')
-rw-r--r--src/instrument.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/instrument.cc b/src/instrument.cc
index 1175f69..43ee4ac 100644
--- a/src/instrument.cc
+++ b/src/instrument.cc
@@ -83,7 +83,8 @@ Sample *Instrument::sample(level_t level, size_t pos)
}
if(Conf::enable_velocity_modifier) {
- mod += (pos - lastpos) / (44100.0 * Conf::velocity_modifier_falloff);
+ mod += (pos - lastpos) /
+ (Conf::samplerate * Conf::velocity_modifier_falloff);
if(mod > 1.0) mod = 1.0;
}