summaryrefslogtreecommitdiff
path: root/src/drumgizmo.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r--src/drumgizmo.cc10
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()