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 | |
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')
-rw-r--r-- | src/common/interface/EngineInterface.hpp | 4 | ||||
-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 |
7 files changed, 17 insertions, 41 deletions
diff --git a/src/common/interface/EngineInterface.hpp b/src/common/interface/EngineInterface.hpp index 4cd8c64e..8522c57c 100644 --- a/src/common/interface/EngineInterface.hpp +++ b/src/common/interface/EngineInterface.hpp @@ -72,10 +72,6 @@ public: virtual void clear_patch(const std::string& patch_path) = 0; - virtual void set_polyphony(const std::string& patch_path, uint32_t poly) = 0; - - virtual void set_polyphonic(const std::string& path, bool poly) = 0; - virtual void disconnect_all(const std::string& parent_patch_path, const std::string& path) = 0; 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()); } |