summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/engine/JackAudioDriver.cpp5
-rw-r--r--src/engine/JackAudioDriver.hpp6
-rw-r--r--src/gui/ThreadedLoader.cpp2
-rw-r--r--src/serialisation/Parser.cpp24
4 files changed, 20 insertions, 17 deletions
diff --git a/src/engine/JackAudioDriver.cpp b/src/engine/JackAudioDriver.cpp
index 19a66281..864c843b 100644
--- a/src/engine/JackAudioDriver.cpp
+++ b/src/engine/JackAudioDriver.cpp
@@ -78,9 +78,8 @@ JackAudioPort::~JackAudioPort()
void
JackAudioPort::prepare_buffer(jack_nframes_t nframes)
{
- jack_sample_t* jack_buf = (jack_sample_t*)jack_port_get_buffer(_jack_port, nframes);
-
- AudioBuffer* patch_buf = (AudioBuffer*)_patch_port->buffer(0);
+ jack_sample_t* jack_buf = (jack_sample_t*)jack_port_get_buffer(_jack_port, nframes);
+ AudioBuffer* patch_buf = (AudioBuffer*)_patch_port->buffer(0);
//cerr << "[JACK] " << _patch_port->path() << " buffer: " << patch_buf << endl;
diff --git a/src/engine/JackAudioDriver.hpp b/src/engine/JackAudioDriver.hpp
index dc3f15df..275aca79 100644
--- a/src/engine/JackAudioDriver.hpp
+++ b/src/engine/JackAudioDriver.hpp
@@ -104,9 +104,9 @@ public:
bool is_realtime() const { return jack_is_realtime(_client); }
- jack_client_t* jack_client() const { return _client; }
- SampleCount buffer_size() const { return _buffer_size; }
- SampleCount sample_rate() const { return _sample_rate; }
+ jack_client_t* jack_client() const { return _client; }
+ SampleCount buffer_size() const { return _buffer_size; }
+ SampleCount sample_rate() const { return _sample_rate; }
bool is_activated() const { return _is_activated; }
inline SampleCount frame_time() const { return jack_frame_time(_client); }
diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp
index bc88b9a7..087ade58 100644
--- a/src/gui/ThreadedLoader.cpp
+++ b/src/gui/ThreadedLoader.cpp
@@ -97,8 +97,6 @@ ThreadedLoader::load_patch(bool merge,
else
engine_base = engine_parent.get().base();
}
-
-
// Filthy hack to load deprecated patches based on file extension
if (data_base_uri.substr(data_base_uri.length()-3) == ".om") {
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp
index 0bd8b476..c722b21e 100644
--- a/src/serialisation/Parser.cpp
+++ b/src/serialisation/Parser.cpp
@@ -70,10 +70,13 @@ Parser::parse_document(
{
Redland::Model model(*world->rdf_world, document_uri, document_uri);
- if (object_uri == document_uri || object_uri == "")
- cout << "Parsing document " << object_uri << endl;
- else
+ if (object_uri == document_uri || object_uri == "") {
+ cout << "Parsing " << object_uri << " from " << document_uri << endl;
+ cout << "Base: " << engine_base;
+ cout << ", Symbol: " << ((bool)symbol ? symbol.get() : "_") << endl;
+ } else {
cout << "Parsing " << object_uri << " from " << document_uri << endl;
+ }
return parse(world, target, model, document_uri, engine_base, object_uri, symbol, data);;
}
@@ -324,13 +327,19 @@ Parser::parse_patch(
patch_poly = static_cast<uint32_t>(poly_node.to_int());
}
- string symbol = uri_relative_to_base(base_uri, object_uri);
- symbol = symbol.substr(0, symbol.find("."));
+ string symbol;
+ if (object_uri != "") {
+ symbol = uri_relative_to_base(base_uri, object_uri);
+ } else {
+ symbol = base_uri.substr(base_uri.find_last_of("/") + 1);
+ symbol = symbol.substr(0, symbol.find("."));
+ }
+
Path patch_path("/");
if (engine_base == "")
patch_path = "/";
else if (engine_base[engine_base.length()-1] == '/')
- patch_path = Path(engine_base + symbol);
+ patch_path = Path(engine_base + Path::nameify(symbol));
else if (Path::is_valid(engine_base))
patch_path = (Path)engine_base;
else if (Path::is_valid(string("/").append(engine_base)))
@@ -605,9 +614,6 @@ Parser::parse_connections(
continue;
}
- src_path = src_path.substr(parent.base().length()-1);
- dst_path = dst_path.substr(parent.base().length()-1);
-
target->connect(src_path, dst_path);
}