diff options
author | Wohlstand <admin@wohlnet.ru> | 2024-08-22 18:26:45 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2024-08-22 18:26:45 +0300 |
commit | b00d3f8d933fc7de26b954bedf841cb484139562 (patch) | |
tree | f2a7d6b2ee45cece57fdbe78a944b41c459a5c0a /utils/winmm_drv/config | |
parent | c68dc6970d5b4abab13e138ac977f7212ef32e4a (diff) | |
download | libADLMIDI-b00d3f8d933fc7de26b954bedf841cb484139562.tar.gz libADLMIDI-b00d3f8d933fc7de26b954bedf841cb484139562.tar.bz2 libADLMIDI-b00d3f8d933fc7de26b954bedf841cb484139562.zip |
WinMM: Added gaining function
Diffstat (limited to 'utils/winmm_drv/config')
-rw-r--r-- | utils/winmm_drv/config/regconfig.c | 19 | ||||
-rw-r--r-- | utils/winmm_drv/config/regconfig.h | 6 |
2 files changed, 24 insertions, 1 deletions
diff --git a/utils/winmm_drv/config/regconfig.c b/utils/winmm_drv/config/regconfig.c index 6e35df0..a049a7d 100644 --- a/utils/winmm_drv/config/regconfig.c +++ b/utils/winmm_drv/config/regconfig.c @@ -163,11 +163,13 @@ void setupDefault(DriverSettings *setup) setup->flagFullBrightness = BST_UNCHECKED; setup->volumeModel = 0; - setup->chanAlloc = 0; + setup->chanAlloc = -1; setup->numChips = 4; setup->num4ops = -1; setup->outputDevice = (UINT)-1; + + setup->gain100 = 100; } @@ -224,6 +226,9 @@ void loadSetup(DriverSettings *setup) if(readUIntFromRegistry(HKEY_CURRENT_USER, s_regPath, L"outputDevice", &uVal)) setup->outputDevice = uVal; + + if(readUIntFromRegistry(HKEY_CURRENT_USER, s_regPath, L"gain100", &uVal)) + setup->gain100 = uVal; } void saveSetup(DriverSettings *setup) @@ -246,8 +251,20 @@ void saveSetup(DriverSettings *setup) writeIntToRegistry(HKEY_CURRENT_USER, s_regPath, L"numChips", setup->numChips); writeIntToRegistry(HKEY_CURRENT_USER, s_regPath, L"num4ops", setup->num4ops); writeUIntToRegistry(HKEY_CURRENT_USER, s_regPath, L"outputDevice", setup->outputDevice); + writeUIntToRegistry(HKEY_CURRENT_USER, s_regPath, L"gain100", setup->gain100); +} + +void getGain(DriverSettings *setup) +{ + UINT uVal; + if(readUIntFromRegistry(HKEY_CURRENT_USER, s_regPath, L"gain100", &uVal)) + setup->gain100 = uVal; } +void saveGain(DriverSettings *setup) +{ + writeUIntToRegistry(HKEY_CURRENT_USER, s_regPath, L"gain100", setup->gain100); +} static const PWCHAR s_regPathNotify = L"SOFTWARE\\Wohlstand\\libADLMIDI\\notify"; diff --git a/utils/winmm_drv/config/regconfig.h b/utils/winmm_drv/config/regconfig.h index 7c49bd6..2dac28a 100644 --- a/utils/winmm_drv/config/regconfig.h +++ b/utils/winmm_drv/config/regconfig.h @@ -30,6 +30,8 @@ typedef struct DriverSettings_t int num4ops; UINT outputDevice; + + UINT gain100; } DriverSettings; extern const WCHAR g_adlSignalMemory[]; @@ -38,9 +40,13 @@ extern void setupDefault(DriverSettings *setup); extern void loadSetup(DriverSettings *setup); extern void saveSetup(DriverSettings *setup); +extern void saveGain(DriverSettings *setup); +extern void getGain(DriverSettings *setup); + #define DRV_SIGNAL_RELOAD_SETUP 1 #define DRV_SIGNAL_RESET_SYNTH 2 +#define DRV_SIGNAL_UPDATE_GAIN 3 // Client /** |