aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-21 23:10:41 +0000
committerDavid Robillard <d@drobilla.net>2009-10-21 23:10:41 +0000
commit7f7157ca058d0b904da9674ede1e1eb00de81890 (patch)
tree31b355f3153ec9ef925856c6fa5b5125c2c0e846 /src
parent745fb21107e4320f23f0187a97e02ae3d117e930 (diff)
downloadmachina-7f7157ca058d0b904da9674ede1e1eb00de81890.tar.gz
machina-7f7157ca058d0b904da9674ede1e1eb00de81890.tar.bz2
machina-7f7157ca058d0b904da9674ede1e1eb00de81890.zip
Fix compilation.
git-svn-id: http://svn.drobilla.net/lad/trunk/machina@2201 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/engine/Loader.cpp8
-rw-r--r--src/engine/Problem.cpp1
2 files changed, 5 insertions, 4 deletions
diff --git a/src/engine/Loader.cpp b/src/engine/Loader.cpp
index 50f5bf8..a0e99f8 100644
--- a/src/engine/Loader.cpp
+++ b/src/engine/Loader.cpp
@@ -95,7 +95,7 @@ Loader::load(const Glib::ustring& uri)
for (Query::Results::iterator i = results.begin(); i != results.end(); ++i) {
const char* node_id = (*i)["node"];
SharedPtr<Node> node(new Node(
- TimeStamp(TimeUnit(TimeUnit::BEATS, MACHINA_PPQN), (double)(*i)["duration"]),
+ TimeStamp(TimeUnit(TimeUnit::BEATS, MACHINA_PPQN), (*i)["duration"].to_float()),
true));
machine->add_node(node);
created[node_id] = node;
@@ -116,7 +116,7 @@ Loader::load(const Glib::ustring& uri)
const char* node_id = (*i)["node"];
if (created.find(node_id) == created.end()) {
SharedPtr<Node> node(new Node(
- TimeStamp(TimeUnit(TimeUnit::BEATS, MACHINA_PPQN), (double)(*i)["duration"]),
+ TimeStamp(TimeUnit(TimeUnit::BEATS, MACHINA_PPQN), (*i)["duration"].to_float()),
false));
machine->add_node(node);
created[node_id] = node;
@@ -158,7 +158,7 @@ Loader::load(const Glib::ustring& uri)
Created::iterator node_i = created.find((const char*)(*i)["node"]);
if (node_i != created.end()) {
SharedPtr<Node> node = node_i->second;
- const int note_num = (*i)["note"];
+ const int note_num = (*i)["note"].to_int();
if (note_num >= 0 && note_num <= 127) {
node->set_enter_action(ActionFactory::note_on((unsigned char)note_num));
node->set_exit_action(ActionFactory::note_off((unsigned char)note_num));
@@ -185,7 +185,7 @@ Loader::load(const Glib::ustring& uri)
for (Query::Results::iterator i = results.begin(); i != results.end(); ++i) {
const char* src_uri = (*i)["src"];
const char* dst_uri = (*i)["dst"];
- float prob = (*i)["prob"];
+ float prob = (*i)["prob"].to_float();
Created::iterator src_i = created.find(src_uri);
Created::iterator dst_i = created.find(dst_uri);
diff --git a/src/engine/Problem.cpp b/src/engine/Problem.cpp
index 6ce1474..e6d4120 100644
--- a/src/engine/Problem.cpp
+++ b/src/engine/Problem.cpp
@@ -28,6 +28,7 @@
#include "raul/SMFReader.hpp"
#include "raul/midi_events.h"
#include "eugene/Problem.hpp"
+#include "machina-config.h"
using namespace std;