Skip to content

Commit

Permalink
[merge] Add missing combobox items
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Nov 16, 2024
1 parent c1f61ad commit aa59c86
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/plugins/score-plugin-media/Media/Merger/Executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,23 @@ namespace Execution
MergerComponent::MergerComponent(
Media::Merger::Model& element, const Execution::Context& ctx, QObject* parent)
: Execution::ProcessComponent_T<Media::Merger::Model, ossia::node_process>{
element, ctx, "Executor::MergerComponent", parent}
element, ctx, "Executor::MergerComponent", parent}
{
auto node
= ossia::make_node<ossia::nodes::merger>(*ctx.execState.get(), element.inCount());
this->node = node;
switch(element.mode())
{
case Media::Merger::Model::Mono: {
this->node = ossia::make_node<ossia::nodes::mono_merger>(
*ctx.execState.get(), element.inCount());
break;
}
case Media::Merger::Model::Stereo: {
this->node = ossia::make_node<ossia::nodes::merger>(
*ctx.execState.get(), element.inCount());
break;
}
default:
break;
}
m_ossia_process = std::make_shared<ossia::node_process>(node);

// TODO change num of ins dynamically
Expand Down
3 changes: 3 additions & 0 deletions src/plugins/score-plugin-media/Media/Merger/Inspector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class InspectorWidget final : public Process::InspectorWidgetDelegate_T<Model>
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, [&] {
Expand Down

0 comments on commit aa59c86

Please sign in to comment.