From 44c3a6b25b4079f69402af5b51c72c65237c1d9e Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 26 Jun 2017 08:42:04 -0400 Subject: Allow experimental overclocking of sound devices through UI sliders with -cheat enabled --- src/frontend/mame/ui/ui.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/frontend/mame/ui/ui.cpp b/src/frontend/mame/ui/ui.cpp index f669321092f..c6f552e87e2 100644 --- a/src/frontend/mame/ui/ui.cpp +++ b/src/frontend/mame/ui/ui.cpp @@ -1402,6 +1402,16 @@ std::vector mame_ui_manager::slider_init(running_machine &machine std::string str = string_format(_("Overclock CPU %1$s"), exec.device().tag()); sliders.push_back(slider_alloc(machine, SLIDER_ID_OVERCLOCK + slider_index++, str.c_str(), 10, 1000, 2000, 1, param)); } + for (device_sound_interface &snd : sound_interface_iterator(machine.root_device())) + { + device_execute_interface *exec; + if (!snd.device().interface(exec) && snd.device().unscaled_clock() != 0) + { + void *param = (void *)&snd.device(); + std::string str = string_format(_("Overclock %1$s sound"), snd.device().tag()); + sliders.push_back(slider_alloc(machine, SLIDER_ID_OVERCLOCK + slider_index++, str.c_str(), 10, 1000, 2000, 1, param)); + } + } } // add screen parameters -- cgit v1.2.3