diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-02-15 10:43:07 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2015-02-15 10:43:07 +0100 |
commit | 6188081a19dc60209add5e4f2e1c57d64520f914 (patch) | |
tree | 04b96ffba97a23352ebd8a7bcc49f0003b79e465 /src/drumgizmo.cc | |
parent | 8660860404db3fed04a1d9373d6b90a8f173c809 (diff) | |
parent | 3d695f697e7230f3b4fa8922847b20eae632226f (diff) |
Merge with master. Remove obsolete -p argument from cli. Add new -a argument for async kit loading.
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r-- | src/drumgizmo.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 7fded57..2f2232c 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -43,6 +43,8 @@ #include "configuration.h" #include "configparser.h" +#include "nolocale.h" + DrumGizmo::DrumGizmo(AudioOutputEngine *o, AudioInputEngine *i) : MessageReceiver(MSGRCV_ENGINE), loader(), oe(o), ie(i) @@ -85,10 +87,8 @@ bool DrumGizmo::loadkit(std::string file) return true; } -bool DrumGizmo::init(bool preload) +bool DrumGizmo::init() { - (void)preload; - if(!ie->init(kit.instruments)) return false; if(!oe->init(kit.channels)) return false; @@ -468,7 +468,7 @@ void DrumGizmo::setSamplerate(int samplerate) std::string float2str(float a) { char buf[256]; - sprintf(buf, "%f", a); + snprintf_nol(buf, sizeof(buf) - 1, "%f", a); return buf; } @@ -480,7 +480,7 @@ std::string bool2str(bool a) float str2float(std::string a) { if(a == "") return 0.0; - return atof(a.c_str()); + return atof_nol(a.c_str()); } std::string DrumGizmo::configString() |