From 9b51dd7d667e97338a92711543fc3e942faae52f Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Mon, 21 Sep 2020 00:43:58 +0300 Subject: Added WinMM driver for windows (#236) * ADLMIDI2: Fixed an MSVC build However, it may work glitchy! * Experimental WinMM MIDI driver TODO: Make a control panel to configure the driver * WinMM-DRV: A workaround for older MinGW * WinMM-DRV: WIP control panel appled / tool * WinMM-DRV: Better test a driver's work * WinMM-DRV: More progress on a control panel * WinMM-DRV: And more progress on this control panel It's almost completed, I need to make the working setup through a registry. * WinMM-DRV: Driver is almost ready However, control panel can't ping a driver to reload settings yet * WinMM-DRV: Fix the missing volume model setup * WinMM-DRV: Setup reload on the fly now work! * WinMM-DRV: Stabilize the thing * WinMM-DRV: Stabilizing * WinMM-DRV: Avoid all "setup" in names to avoid a stupid PCA thing: https://stackoverflow.com/questions/17660404/how-to-programmatically-disable-program-compatibility-assistant-in-windows-7-and * A small warning fix at the WOPL module * WinMM-DRV: Fixed some warnings * WinMM-DRV: Avoid PCA dialog on the installer * WiNMM-DRV: Make the linking of pthread being optional Required to use MinGW-w64 toolchain with the "win32" threading mode * WinMM-DRV: Receive the MODM_RESET to reset the MIDI state * WinMM-DRV: Attempt to fix a sound distorsion on song song * WinMM-Drv: Fixed a build on some older MinGW toolchains * WinMM-Drv: Fixed default settings not being loaded --- utils/winmm_drv/config/regconfig.h | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 utils/winmm_drv/config/regconfig.h (limited to 'utils/winmm_drv/config/regconfig.h') diff --git a/utils/winmm_drv/config/regconfig.h b/utils/winmm_drv/config/regconfig.h new file mode 100644 index 0000000..f854d1b --- /dev/null +++ b/utils/winmm_drv/config/regconfig.h @@ -0,0 +1,61 @@ +#pragma once +#ifndef REG_SETUP_HHHH +#define REG_SETUP_HHHH + +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct DriverSettings_t +{ + BOOL useExternalBank; + int bankId; + WCHAR bankPath[MAX_PATH]; + int emulatorId; + + BOOL flagDeepTremolo; + BOOL flagDeepVibrato; + + BOOL flagSoftPanning; + BOOL flagScaleModulators; + BOOL flagFullBrightness; + + int volumeModel; + int numChips; + int num4ops; +} DriverSettings; + +extern const WCHAR g_adlSignalMemory[]; + +extern void setupDefault(DriverSettings *setup); +extern void loadSetup(DriverSettings *setup); +extern void saveSetup(DriverSettings *setup); + + +#define DRV_SIGNAL_RELOAD_SETUP 1 +#define DRV_SIGNAL_RESET_SYNTH 2 + +// Client +/** + * @brief Ping the running driver to immediately reload the settings + */ +extern void sendSignal(int sig); + +#ifdef ENABLE_REG_SERVER +// Server +extern void openSignalListener(); +extern int hasReloadSetupSignal(); +extern void resetSignal(); +extern void closeSignalListener(); +#endif + +#ifdef __cplusplus +} +#endif + + +#endif -- cgit v1.2.3