From aa59c86fb73ac96d1fba70b87d74bd2a9e80e998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Micha=C3=ABl=20Celerier?= Date: Sat, 16 Nov 2024 10:06:33 -0500 Subject: [PATCH] [merge] Add missing combobox items --- .../Media/Merger/Executor.cpp | 20 +++++++++++++++---- .../Media/Merger/Inspector.hpp | 3 +++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/plugins/score-plugin-media/Media/Merger/Executor.cpp b/src/plugins/score-plugin-media/Media/Merger/Executor.cpp index 3fd23373e7..273aa9e856 100644 --- a/src/plugins/score-plugin-media/Media/Merger/Executor.cpp +++ b/src/plugins/score-plugin-media/Media/Merger/Executor.cpp @@ -12,11 +12,23 @@ namespace Execution MergerComponent::MergerComponent( Media::Merger::Model& element, const Execution::Context& ctx, QObject* parent) : Execution::ProcessComponent_T{ - element, ctx, "Executor::MergerComponent", parent} + element, ctx, "Executor::MergerComponent", parent} { - auto node - = ossia::make_node(*ctx.execState.get(), element.inCount()); - this->node = node; + switch(element.mode()) + { + case Media::Merger::Model::Mono: { + this->node = ossia::make_node( + *ctx.execState.get(), element.inCount()); + break; + } + case Media::Merger::Model::Stereo: { + this->node = ossia::make_node( + *ctx.execState.get(), element.inCount()); + break; + } + default: + break; + } m_ossia_process = std::make_shared(node); // TODO change num of ins dynamically diff --git a/src/plugins/score-plugin-media/Media/Merger/Inspector.hpp b/src/plugins/score-plugin-media/Media/Merger/Inspector.hpp index 110359d55a..ee8dbceaf4 100644 --- a/src/plugins/score-plugin-media/Media/Merger/Inspector.hpp +++ b/src/plugins/score-plugin-media/Media/Merger/Inspector.hpp @@ -31,6 +31,9 @@ class InspectorWidget final : public Process::InspectorWidgetDelegate_T m_count.setRange(1, 24); m_count.setValue(obj.inCount()); + m_mode.addItem("Stereo"); + m_mode.addItem("Mono"); + auto lay = new QFormLayout{this}; con(process(), &Model::inCountChanged, this, [&] {