summaryrefslogtreecommitdiff
path: root/src/instrument.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-03-31 21:26:42 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2016-03-31 21:26:42 +0200
commit6e6af33f00a17e842da81e4a04ea9c3421c55adb (patch)
tree245dc00530554291f8547ee311a7a497a0ccd58e /src/instrument.cc
parente9c4a96ad32c2ab22f6f3edc5b68f1eb414c041e (diff)
Fix issues from rebasing.
Diffstat (limited to 'src/instrument.cc')
-rw-r--r--src/instrument.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/instrument.cc b/src/instrument.cc
index 3348a4f..ee778d7 100644
--- a/src/instrument.cc
+++ b/src/instrument.cc
@@ -26,8 +26,8 @@
*/
#include "instrument.h"
-#include <stdlib.h>
-#include <stdio.h>
+#include <cstdlib>
+//#include <stdio.h>
#include <hugin.hpp>
@@ -82,7 +82,7 @@ Sample* Instrument::sample(level_t level, size_t pos)
if(enable_velocity_randomiser)
{
- float r = (float)rand() / (float)RAND_MAX; // random number: [0;1]
+ float r = (float)std::rand() / (float)RAND_MAX; // random number: [0;1]
r -= 0.5; // random number [-0.5;0.5]
r *= velocity_randomiser_weight * 2; // ex. random number [-0.1;0.1]
level += r;
@@ -121,7 +121,7 @@ Sample* Instrument::sample(level_t level, size_t pos)
return NULL;
}
- size_t idx = rand()%(s.size());
+ size_t idx = std::rand()%(s.size());
sample = s[idx];
}