From 761788fbd9ce7e272c84473de80260a66c05e85e Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Sat, 20 Aug 2022 20:56:56 +1000 Subject: emu/validity.cpp, ui/info.cpp: Base "no sound" check on speaker devices. Currently the speaker device is the only way sound can get to the OSD layer, so its presence or absence determines whether the emulated system is capabale of producing sound. A few systems use chips with sound capability for other purposes (typically I/O or video) while leaving the sound outputs disconnected. These systems should display the notice about the absence of sound output. --- src/emu/validity.cpp | 6 ++++-- src/frontend/mame/ui/info.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/emu/validity.cpp b/src/emu/validity.cpp index e4cf0860064..fa80e36d5f2 100644 --- a/src/emu/validity.cpp +++ b/src/emu/validity.cpp @@ -11,10 +11,12 @@ #include "emu.h" #include "validity.h" -#include "corestr.h" #include "emuopts.h" #include "romload.h" +#include "speaker.h" #include "video/rgbutil.h" + +#include "corestr.h" #include "unicode.h" #include @@ -2044,7 +2046,7 @@ void validity_checker::validate_driver(device_t &root) device_t::feature_type const imperfect(m_current_driver->type.imperfect_features()); if (!(m_current_driver->flags & (machine_flags::IS_BIOS_ROOT | machine_flags::NO_SOUND_HW)) && !(unemulated & device_t::feature::SOUND)) { - sound_interface_enumerator iter(root); + speaker_device_enumerator iter(root); if (!iter.first()) osd_printf_error("Driver is missing MACHINE_NO_SOUND or MACHINE_NO_SOUND_HW flag\n"); } diff --git a/src/frontend/mame/ui/info.cpp b/src/frontend/mame/ui/info.cpp index f6fa969bbb4..da1bc11eb77 100644 --- a/src/frontend/mame/ui/info.cpp +++ b/src/frontend/mame/ui/info.cpp @@ -19,6 +19,7 @@ #include "romload.h" #include "screen.h" #include "softlist.h" +#include "speaker.h" #include #include @@ -208,7 +209,7 @@ machine_static_info::machine_static_info(const ui_options &options, machine_conf for (device_t &device : device_enumerator(config.root_device())) { // the "no sound hardware" warning doesn't make sense when you plug in a sound card - if (dynamic_cast(&device)) + if (dynamic_cast(&device)) m_flags &= ~::machine_flags::NO_SOUND_HW; // build overall emulation status -- cgit v1.2.3