summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend')
-rw-r--r--src/frontend/mame/ui/audioeffects.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/frontend/mame/ui/audioeffects.cpp b/src/frontend/mame/ui/audioeffects.cpp
index 750ef69815b..eb94667f99f 100644
--- a/src/frontend/mame/ui/audioeffects.cpp
+++ b/src/frontend/mame/ui/audioeffects.cpp
@@ -105,6 +105,31 @@ bool menu_audio_effects::handle(event const *ev)
return true;
}
+ case IPT_UI_CLEAR: {
+ switch(uintptr_t(ev->itemref)) {
+ case RS_TYPE:
+ machine().sound().set_resampler_type(sound_manager::RESAMPLER_LOFI);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_LATENCY:
+ machine().sound().set_resampler_hq_latency(0.005);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_LENGTH:
+ machine().sound().set_resampler_hq_length(400);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+
+ case RS_PHASES:
+ machine().sound().set_resampler_hq_phases(200);
+ reset(reset_options::REMEMBER_POSITION);
+ return true;
+ }
+ break;
+ }
+
case IPT_UI_LEFT: {
switch(uintptr_t(ev->itemref)) {
case RS_TYPE:
@@ -189,6 +214,8 @@ u32 menu_audio_effects::flag_lat() const
flag |= FLAG_LEFT_ARROW;
if(latency < 0.0500)
flag |= FLAG_RIGHT_ARROW;
+ if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ)
+ flag |= FLAG_INVERT | FLAG_DISABLE;
return flag;
}
@@ -200,6 +227,8 @@ u32 menu_audio_effects::flag_length() const
flag |= FLAG_LEFT_ARROW;
if(latency < 500)
flag |= FLAG_RIGHT_ARROW;
+ if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ)
+ flag |= FLAG_INVERT | FLAG_DISABLE;
return flag;
}
@@ -211,6 +240,8 @@ u32 menu_audio_effects::flag_phases() const
flag |= FLAG_LEFT_ARROW;
if(latency < 1000)
flag |= FLAG_RIGHT_ARROW;
+ if(machine().sound().resampler_type() != sound_manager::RESAMPLER_HQ)
+ flag |= FLAG_INVERT | FLAG_DISABLE;
return flag;
}
@@ -228,6 +259,7 @@ void menu_audio_effects::populate()
auto eff = sound.default_effect_chain();
for(u32 e = 0; e != eff.size(); e++)
item_append(_(audio_effect::effect_names[eff[e]->type()]), 0, (void *)intptr_t((0xffff << 16) | e));
+
item_append(_("Resampler"), FLAG_UI_HEADING | FLAG_DISABLE, nullptr);
item_append(_("Type"), sound.resampler_type_names(sound.resampler_type()), flag_type(), (void *)RS_TYPE);
item_append(_("HQ latency"), format_lat(sound.resampler_hq_latency()), flag_lat(), (void *)RS_LATENCY);