diff options
author | David Robillard <d@drobilla.net> | 2008-08-17 04:12:10 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-17 04:12:10 +0000 |
commit | 696535322342c56901d4d48641b6f9cf816ac1e1 (patch) | |
tree | 48693e04f3c170080deeffc2d13d95daab9afe44 /src/libs | |
parent | fa067527fe00b66b85d71955e152e9ef9215c9cd (diff) | |
download | ingen-696535322342c56901d4d48641b6f9cf816ac1e1.tar.gz ingen-696535322342c56901d4d48641b6f9cf816ac1e1.tar.bz2 ingen-696535322342c56901d4d48641b6f9cf816ac1e1.zip |
Remove remnants of imperative polyphony interface.
git-svn-id: http://svn.drobilla.net/lad/ingen@1413 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/client/OSCEngineSender.cpp | 28 | ||||
-rw-r--r-- | src/libs/client/OSCEngineSender.hpp | 4 | ||||
-rw-r--r-- | src/libs/engine/QueuedEngineInterface.cpp | 14 | ||||
-rw-r--r-- | src/libs/gui/LoadSubpatchWindow.cpp | 2 | ||||
-rw-r--r-- | src/libs/gui/ObjectMenu.cpp | 3 | ||||
-rw-r--r-- | src/libs/gui/PatchView.cpp | 3 |
6 files changed, 17 insertions, 37 deletions
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp index 22f0ce86..4f8fcbe5 100644 --- a/src/libs/client/OSCEngineSender.cpp +++ b/src/libs/client/OSCEngineSender.cpp @@ -220,34 +220,6 @@ OSCEngineSender::clear_patch(const string& patch_path) void -OSCEngineSender::set_polyphony(const string& patch_path, uint32_t poly) -{ - send("/ingen/set_polyphony", "isi", - next_id(), - patch_path.c_str(), - poly, - LO_ARGS_END); -} - - -void -OSCEngineSender::set_polyphonic(const string& path, bool poly) -{ - if (poly) { - send("/ingen/set_polyphonic", "isT", - next_id(), - path.c_str(), - LO_ARGS_END); - } else { - send("/ingen/set_polyphonic", "isF", - next_id(), - path.c_str(), - LO_ARGS_END); - } -} - - -void OSCEngineSender::connect(const string& src_port_path, const string& dst_port_path) { diff --git a/src/libs/client/OSCEngineSender.hpp b/src/libs/client/OSCEngineSender.hpp index 771a7232..f94b86d5 100644 --- a/src/libs/client/OSCEngineSender.hpp +++ b/src/libs/client/OSCEngineSender.hpp @@ -100,10 +100,6 @@ public: void clear_patch(const string& patch_path); - void set_polyphony(const string& patch_path, uint32_t poly); - - void set_polyphonic(const string& path, bool poly); - void connect(const string& src_port_path, const string& dst_port_path); diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp index 23b9c77e..3e45734a 100644 --- a/src/libs/engine/QueuedEngineInterface.cpp +++ b/src/libs/engine/QueuedEngineInterface.cpp @@ -319,10 +319,20 @@ QueuedEngineInterface::set_property(const string& path, push_queued(new EnablePatchEvent(_engine, _responder, now(), path, value.get_bool())); return; } + } else if (predicate == "ingen:polyphonic") { + if (value.type() == Atom::BOOL) { + push_queued(new SetPolyphonicEvent(_engine, _responder, now(), this, path, value.get_bool())); + return; + } + } else if (predicate == "ingen:polyphony") { + if (value.type() == Atom::INT) { + push_queued(new SetPolyphonyEvent(_engine, _responder, now(), this, path, value.get_int32())); + return; + } } - cerr << "WARNING: Unknown property \"" << predicate << "\" ignored" << endl; -} + cerr << "WARNING: Unknown property (or bad type) \"" << predicate << "\"" << endl; +} // Requests // diff --git a/src/libs/gui/LoadSubpatchWindow.cpp b/src/libs/gui/LoadSubpatchWindow.cpp index f637409e..cd3745dd 100644 --- a/src/libs/gui/LoadSubpatchWindow.cpp +++ b/src/libs/gui/LoadSubpatchWindow.cpp @@ -91,7 +91,7 @@ LoadSubpatchWindow::set_patch(SharedPtr<PatchModel> patch) _patch = patch; char temp_buf[4]; - snprintf(temp_buf, 4, "%zd", patch->poly()); + snprintf(temp_buf, 4, "%u", patch->poly()); Glib::ustring txt = "Same as parent ("; txt.append(temp_buf).append(")"); _poly_from_parent_radio->set_label(txt); diff --git a/src/libs/gui/ObjectMenu.cpp b/src/libs/gui/ObjectMenu.cpp index 8f7c3869..becbf964 100644 --- a/src/libs/gui/ObjectMenu.cpp +++ b/src/libs/gui/ObjectMenu.cpp @@ -78,7 +78,8 @@ void ObjectMenu::on_menu_polyphonic() { if (_enable_signal) - App::instance().engine()->set_polyphonic(_object->path(), _polyphonic_menuitem->get_active()); + App::instance().engine()->set_property( + _object->path(), "ingen:polyphonic", _polyphonic_menuitem->get_active()); } diff --git a/src/libs/gui/PatchView.cpp b/src/libs/gui/PatchView.cpp index 8b720db4..0ffe1191 100644 --- a/src/libs/gui/PatchView.cpp +++ b/src/libs/gui/PatchView.cpp @@ -161,7 +161,8 @@ PatchView::process_toggled() void PatchView::poly_changed() { - App::instance().engine()->set_polyphony(_patch->path(), _poly_spin->get_value_as_int()); + App::instance().engine()->set_property(_patch->path(), "ingen:polyphony", + _poly_spin->get_value_as_int()); } |