diff options
author | David Robillard <d@drobilla.net> | 2016-10-01 17:47:37 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-10-02 12:24:57 -0400 |
commit | e2f63c5d8e296a35c06d4a3fd522aa5224a6ad3d (patch) | |
tree | 724dc9a1945b7ffa8a286a1f1a9f0bf6b0c11332 /src | |
parent | a172e76897157e5a0d2ebd3fa3f7f77ec38a5df0 (diff) | |
download | ingen-e2f63c5d8e296a35c06d4a3fd522aa5224a6ad3d.tar.gz ingen-e2f63c5d8e296a35c06d4a3fd522aa5224a6ad3d.tar.bz2 ingen-e2f63c5d8e296a35c06d4a3fd522aa5224a6ad3d.zip |
Fix unit test responses and ensure events succeed
Diffstat (limited to 'src')
-rw-r--r-- | src/AtomReader.cpp | 4 | ||||
-rw-r--r-- | src/TurtleWriter.cpp | 2 | ||||
-rw-r--r-- | src/gui/ingen_gui_lv2.cpp | 2 | ||||
-rw-r--r-- | src/server/UndoStack.cpp | 2 | ||||
-rw-r--r-- | src/server/UndoStack.hpp | 2 | ||||
-rw-r--r-- | src/server/ingen_lv2.cpp | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/src/AtomReader.cpp b/src/AtomReader.cpp index 2d6db912..f77d8d76 100644 --- a/src/AtomReader.cpp +++ b/src/AtomReader.cpp @@ -124,7 +124,7 @@ AtomReader::is_message(const URIs& uris, const LV2_Atom* msg) } bool -AtomReader::write(const LV2_Atom* msg) +AtomReader::write(const LV2_Atom* msg, int32_t default_id) { if (msg->type != _uris.atom_Object) { _log.warn(fmt("Unknown message type <%1%>\n") @@ -145,7 +145,7 @@ AtomReader::write(const LV2_Atom* msg) const int32_t seq_id = ((number && number->type == _uris.atom_Int) ? ((const LV2_Atom_Int*)number)->body - : 0); + : default_id); _iface.set_response_id(seq_id); if (obj->body.otype == _uris.patch_Get) { diff --git a/src/TurtleWriter.cpp b/src/TurtleWriter.cpp index 7ee4a43f..7be046a4 100644 --- a/src/TurtleWriter.cpp +++ b/src/TurtleWriter.cpp @@ -86,7 +86,7 @@ TurtleWriter::~TurtleWriter() } bool -TurtleWriter::write(const LV2_Atom* msg) +TurtleWriter::write(const LV2_Atom* msg, int32_t default_id) { if (!_wrote_prefixes) { // Write namespace prefixes once to reduce traffic diff --git a/src/gui/ingen_gui_lv2.cpp b/src/gui/ingen_gui_lv2.cpp index 682df7a1..9387f742 100644 --- a/src/gui/ingen_gui_lv2.cpp +++ b/src/gui/ingen_gui_lv2.cpp @@ -43,7 +43,7 @@ struct IngenLV2AtomSink : public AtomSink { , _ui_controller(ui_controller) {} - bool write(const LV2_Atom* atom) { + bool write(const LV2_Atom* atom, int32_t default_id) { _ui_write(_ui_controller, 0, lv2_atom_total_size(atom), diff --git a/src/server/UndoStack.cpp b/src/server/UndoStack.cpp index 87391bc7..de4c64ca 100644 --- a/src/server/UndoStack.cpp +++ b/src/server/UndoStack.cpp @@ -44,7 +44,7 @@ UndoStack::start_entry() } bool -UndoStack::write(const LV2_Atom* msg) +UndoStack::write(const LV2_Atom* msg, int32_t default_id) { _stack.back().push_event(msg); return true; diff --git a/src/server/UndoStack.hpp b/src/server/UndoStack.hpp index d8d60e84..6ce6475f 100644 --- a/src/server/UndoStack.hpp +++ b/src/server/UndoStack.hpp @@ -78,7 +78,7 @@ public: UndoStack(URIs& uris, URIMap& map) : _uris(uris), _map(map), _depth(0) {} int start_entry(); - bool write(const LV2_Atom* msg); + bool write(const LV2_Atom* msg, int32_t default_id=0); int finish_entry(); bool empty() const { return _stack.empty(); } diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index a21cb4c9..cc01f68a 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -274,7 +274,7 @@ public: /** AtomSink::write implementation called by the PostProcessor in the main * thread to write responses to the UI. */ - bool write(const LV2_Atom* atom) { + bool write(const LV2_Atom* atom, int32_t default_id) { // Called from post-processor in main thread while (_to_ui.write(lv2_atom_total_size(atom), atom) == 0) { // Overflow, wait until ring is drained next cycle |