From 55d2eab229b563aa0e0f5f9319570876c525ccb8 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Tue, 25 Mar 2025 19:52:51 +0300 Subject: Implemented support of YMFM emulators and OPL2 --- utils/midiplay/adlmidiplay.cpp | 4 ++++ utils/vlc_codec/libadlmidi.c | 7 ++++++- utils/winmm_drv/cpl/config_dialog.c | 4 ++++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'utils') diff --git a/utils/midiplay/adlmidiplay.cpp b/utils/midiplay/adlmidiplay.cpp index 4001378..e0bbdde 100644 --- a/utils/midiplay/adlmidiplay.cpp +++ b/utils/midiplay/adlmidiplay.cpp @@ -1430,6 +1430,10 @@ int main(int argc, char **argv) emulator = ADLMIDI_EMU_JAVA; else if(!std::strcmp("--emu-esfmu", argv[2])) emulator = ADLMIDI_EMU_ESFMu; + else if(!std::strcmp("--emu-ymfm-opl2", argv[2])) + emulator = ADLMIDI_EMU_YMFM_OPL2; + else if(!std::strcmp("--emu-ymfm-opl3", argv[2])) + emulator = ADLMIDI_EMU_YMFM_OPL3; #endif #if defined(ADLMIDI_ENABLE_HW_SERIAL) && !defined(OUTPUT_WAVE_ONLY) else if(!std::strcmp("--serial", argv[2])) diff --git a/utils/vlc_codec/libadlmidi.c b/utils/vlc_codec/libadlmidi.c index 61f132e..1ef1387 100644 --- a/utils/vlc_codec/libadlmidi.c +++ b/utils/vlc_codec/libadlmidi.c @@ -164,6 +164,11 @@ static const char * const emulator_type_descriptions[] = N_("DOSBox"), N_("Opal"), N_("Java OPL3"), + N_("ESFMu"), +#ifndef ADLMIDI_DISABLE_YMFM_EMULATOR + N_("YMFM OPL2"), + N_("YMFM OPL3"), +#endif NULL }; @@ -299,7 +304,7 @@ static int Open (vlc_object_t *p_this) } adl_setVolumeRangeModel(p_sys->synth, var_InheritInteger(p_this, CONFIG_PREFIX "volume-model")); - adl_setChannelAllocMode(p_sys->synth, var_InheritInteger(p_this, CONFIG_PREFIX "channel-allocation")); + adl_setChannelAllocMode(p_sys->synth, var_InheritInteger(p_this, CONFIG_PREFIX "channel-allocation")); adl_setFullRangeBrightness(p_sys->synth, var_InheritBool(p_this, CONFIG_PREFIX "full-range-brightness")); diff --git a/utils/winmm_drv/cpl/config_dialog.c b/utils/winmm_drv/cpl/config_dialog.c index 8808e6d..abaa857 100644 --- a/utils/winmm_drv/cpl/config_dialog.c +++ b/utils/winmm_drv/cpl/config_dialog.c @@ -56,6 +56,10 @@ static const char * const emulator_type_descriptions[] = "Opal", "Java OPL3", "ESFMu", +#ifndef ADLMIDI_DISABLE_YMFM_EMULATOR + "YMFM OPL2", + "YMFM OPL3", +#endif NULL }; -- cgit v1.2.3