mirror of
https://github.com/holub/mame
synced 2025-07-04 17:38:08 +03:00
audiomix: let's move those new full/channel menus up
This commit is contained in:
parent
ab72bc83dd
commit
033c012f67
@ -327,15 +327,15 @@ or input and adjust the volume from -96 dB (quietest) to +12 dB (loudest). Fo
|
||||
channel routes, you can also select the individual emulated channel and host
|
||||
channel. Select **Remove this route** to remove a route.
|
||||
|
||||
Select **Add <device> full route** to add a new full route to that group. If
|
||||
Select **Add new full route** to add a new full route to that group. If
|
||||
possible, it will be added and the menu highlight will move to the newly added
|
||||
route. If routes between the highlighted device and every host output/input
|
||||
already exist, no route will be added.
|
||||
|
||||
Select **Add <device> channel route* to add a new channel route to that group.
|
||||
If possible, it will be added and the menu highlight will move to the newly
|
||||
added route. If routes between all channels for the highlighted device and
|
||||
every host output/input channel already exist, no route will be added.
|
||||
Select **Add new channel route* to add a new channel route to that group. If
|
||||
possible, it will be added and the menu highlight will move to the newly added
|
||||
route. If routes between all channels for the highlighted device and every
|
||||
host output/input channel already exist, no route will be added.
|
||||
|
||||
Some sound modules allow channel assignments and volumes to be controlled using
|
||||
an external mixer interface (for example the PipeWire module for Linux has this
|
||||
@ -373,7 +373,7 @@ by output device chains. When editing the **Default** chain, you can restore
|
||||
the built-in default value for a parameter by pressing the UI Clear key
|
||||
(Del/Delete/Forward Delete on the keyboard by default).
|
||||
|
||||
The Audio Events menu also allows you to configure the algorithm used for audio
|
||||
The Audio Effects menu also allows you to configure the algorithm used for audio
|
||||
sample rate conversion. The default **LoFi** algorithm has modest CPU
|
||||
requirements. The **HQ** algorithm provides higher quality sample rate
|
||||
conversion at the expense of requiring substantially higher CPU performance.
|
||||
@ -391,7 +391,7 @@ low-pass filter can simulate the poor high-frequency response typical of many
|
||||
arcade cabinets and television sets.
|
||||
|
||||
The Q factor controls how sharp the transition from the stop band to the
|
||||
passband is. Higher factors provide a sharper transition. Values over 0.7
|
||||
passband is. Higher factors provide a sharper transition. Values over 0.71
|
||||
cause the filter to amplify frequencies close to the cutoff frequency, which
|
||||
may be surprising or undesirable.
|
||||
|
||||
|
@ -661,7 +661,10 @@ void menu_audio_mixer::populate()
|
||||
if(cursel_line == 0xffffffff)
|
||||
cursel_line = 0;
|
||||
|
||||
if(m_reset_selection.m_maptype == MT_INTERNAL)
|
||||
if(!m_reset_item)
|
||||
m_reset_item = (m_selections[0].m_maptype == MT_NONE) ? ITM_ADD_FULL : ITM_GUEST_CHANNEL;
|
||||
|
||||
else if(m_reset_selection.m_maptype == MT_INTERNAL)
|
||||
cursel_line = 0xffffffff;
|
||||
|
||||
if((cursel_line < m_selections.size()) && (m_selections[cursel_line].m_maptype == MT_FULL)) {
|
||||
@ -671,11 +674,31 @@ void menu_audio_mixer::populate()
|
||||
|
||||
// (Re)build the menu
|
||||
uint32_t cursel = 0;
|
||||
|
||||
auto const add_routes = [this, &cursel] ()
|
||||
{
|
||||
item_append(
|
||||
_("menu-audiomix", "Add new full route"),
|
||||
0,
|
||||
reinterpret_cast<void *>(((cursel + 1) << 3) | ITM_ADD_FULL));
|
||||
item_append(
|
||||
_("menu-audiomix", "Add new channel route"),
|
||||
0,
|
||||
reinterpret_cast<void *>(((cursel + 1) << 3) | ITM_ADD_CHANNEL));
|
||||
};
|
||||
|
||||
for(const auto &omap : mapping) {
|
||||
item_append(omap.m_dev->tag(), FLAG_UI_HEADING | FLAG_DISABLE, nullptr);
|
||||
bool first = true;
|
||||
for(const auto &nmap : omap.m_node_mappings) {
|
||||
const auto &node = find_node(nmap.m_node);
|
||||
|
||||
if(first) {
|
||||
first = false;
|
||||
add_routes();
|
||||
}
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
|
||||
item_append(
|
||||
omap.m_dev->is_output() ? _("menu-audiomix", "Output") : _("menu-audiomix", "Input"),
|
||||
_("menu-audiomix", "[all]"),
|
||||
@ -699,13 +722,18 @@ void menu_audio_mixer::populate()
|
||||
_("menu-audiomix", "Remove this route"),
|
||||
0,
|
||||
reinterpret_cast<void *>(((cursel + 1) << 3) | ITM_REMOVE));
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
|
||||
++cursel;
|
||||
}
|
||||
for(const auto &cmap : omap.m_channel_mappings) {
|
||||
const auto &node = find_node(cmap.m_node);
|
||||
|
||||
if(first) {
|
||||
first = false;
|
||||
add_routes();
|
||||
}
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
|
||||
item_append(
|
||||
omap.m_dev->is_output() ? _("menu-audiomix", "Output") : _("menu-audiomix", "Input"),
|
||||
omap.m_dev->get_position(cmap.m_guest_channel).name(),
|
||||
@ -734,21 +762,13 @@ void menu_audio_mixer::populate()
|
||||
_("menu-audiomix", "Remove this route"),
|
||||
0,
|
||||
reinterpret_cast<void *>(((cursel + 1) << 3) | ITM_REMOVE));
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
|
||||
++cursel;
|
||||
}
|
||||
if(omap.m_node_mappings.empty() && omap.m_channel_mappings.empty())
|
||||
if(omap.m_node_mappings.empty() && omap.m_channel_mappings.empty()) {
|
||||
add_routes();
|
||||
++cursel;
|
||||
|
||||
item_append(
|
||||
util::string_format(_("menu-audiomix", "Add %1$s full route"), omap.m_dev->tag()),
|
||||
0,
|
||||
reinterpret_cast<void *>((cursel << 3) | ITM_ADD_FULL));
|
||||
item_append(
|
||||
util::string_format(_("menu-audiomix", "Add %1$s channel route"), omap.m_dev->tag()),
|
||||
0,
|
||||
reinterpret_cast<void *>((cursel << 3) | ITM_ADD_CHANNEL));
|
||||
}
|
||||
}
|
||||
|
||||
item_append(menu_item_type::SEPARATOR);
|
||||
|
Loading…
Reference in New Issue
Block a user