From 6e6af33f00a17e842da81e4a04ea9c3421c55adb Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 31 Mar 2016 21:26:42 +0200 Subject: Fix issues from rebasing. --- src/drumkitparser.cc | 2 +- src/instrument.cc | 8 ++++---- src/instrument.h | 2 -- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/drumkitparser.cc b/src/drumkitparser.cc index 09f82e8..221e921 100644 --- a/src/drumkitparser.cc +++ b/src/drumkitparser.cc @@ -215,7 +215,7 @@ void DrumKitParser::endTag(const std::string& name) if(c->num == NO_CHANNEL) { ERR(kitparser, "Missing channel '%s' in instrument '%s'\n", - c->name.c_str(), i->getName().c_str()); + c->name.c_str(), instrument->getName().c_str()); } else { 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 -#include +#include +//#include #include @@ -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]; } diff --git a/src/instrument.h b/src/instrument.h index 0694d80..a531aec 100644 --- a/src/instrument.h +++ b/src/instrument.h @@ -79,8 +79,6 @@ private: size_t lastpos; float mod; Settings& settings; -}; - Random rand; }; -- cgit v1.2.3