mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Show (# outs) in instrument-selector menu when the instrument is multi-out.
This commit is contained in:
parent
52eea55988
commit
d8198acede
1 changed files with 16 additions and 5 deletions
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
#include "pbd/convert.h"
|
#include "pbd/convert.h"
|
||||||
#include "pbd/enumwriter.h"
|
#include "pbd/enumwriter.h"
|
||||||
|
#include "ardour/chan_count.h"
|
||||||
#include "ardour/plugin_manager.h"
|
#include "ardour/plugin_manager.h"
|
||||||
#include "gtkmm2ext/gui_thread.h"
|
#include "gtkmm2ext/gui_thread.h"
|
||||||
#include "instrument_selector.h"
|
#include "instrument_selector.h"
|
||||||
|
|
@ -124,12 +125,20 @@ InstrumentSelector::build_instrument_list()
|
||||||
for (PluginInfoList::const_iterator i = all_plugs.begin(); i != all_plugs.end();) {
|
for (PluginInfoList::const_iterator i = all_plugs.begin(); i != all_plugs.end();) {
|
||||||
PluginInfoPtr p = *i;
|
PluginInfoPtr p = *i;
|
||||||
++i;
|
++i;
|
||||||
|
|
||||||
|
std::string name = p->name;
|
||||||
|
|
||||||
|
/* in the instrument menu,we need to differentiate the different output configs here*/
|
||||||
|
int n_outs = p->n_outputs.n_audio();
|
||||||
|
if (n_outs > 2) {
|
||||||
|
name += string_compose( " (%1 outs)", n_outs);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*if a plugin appears in multiple types, we need to differentiate the different types here */
|
||||||
bool suffix_type = prev == p->name;
|
bool suffix_type = prev == p->name;
|
||||||
if (!suffix_type && i != all_plugs.end() && (*i)->name == p->name) {
|
if (!suffix_type && i != all_plugs.end() && (*i)->name == p->name) {
|
||||||
suffix_type = true;
|
suffix_type = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
row = *(_instrument_list->append());
|
|
||||||
if (suffix_type) {
|
if (suffix_type) {
|
||||||
std::string pt;
|
std::string pt;
|
||||||
switch (p->type) {
|
switch (p->type) {
|
||||||
|
|
@ -144,10 +153,12 @@ InstrumentSelector::build_instrument_list()
|
||||||
default:
|
default:
|
||||||
pt = enum_2_string (p->type);
|
pt = enum_2_string (p->type);
|
||||||
}
|
}
|
||||||
row[_instrument_list_columns.name] = p->name + " (" + pt + ")";
|
name += " (" + pt + ")";
|
||||||
} else {
|
|
||||||
row[_instrument_list_columns.name] = p->name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
row = *(_instrument_list->append());
|
||||||
|
row[_instrument_list_columns.name] = name;
|
||||||
|
|
||||||
row[_instrument_list_columns.info_ptr] = p;
|
row[_instrument_list_columns.info_ptr] = p;
|
||||||
if (p->unique_id == "https://community.ardour.org/node/7596") {
|
if (p->unique_id == "https://community.ardour.org/node/7596") {
|
||||||
_reasonable_synth_id = n;
|
_reasonable_synth_id = n;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue