diff options
author | Wohlstand <admin@wohlnet.ru> | 2020-08-21 22:27:01 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2020-08-21 22:27:01 +0300 |
commit | af8b30f7b83d4ee00f5255f84cc4305d609b446f (patch) | |
tree | 992d0456412d5980bacc6662e12927a9185a62ac /utils | |
parent | c20df9edf6c19a130dd794a9d6c82c93351afbcc (diff) | |
download | libADLMIDI-af8b30f7b83d4ee00f5255f84cc4305d609b446f.tar.gz libADLMIDI-af8b30f7b83d4ee00f5255f84cc4305d609b446f.tar.bz2 libADLMIDI-af8b30f7b83d4ee00f5255f84cc4305d609b446f.zip |
gen_adldata: Fixed an incorrect detune parsing from WOPL files
Diffstat (limited to 'utils')
-rw-r--r-- | utils/gen_adldata/file_formats/load_wopl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/gen_adldata/file_formats/load_wopl.h b/utils/gen_adldata/file_formats/load_wopl.h index d10d58f..d0c01d3 100644 --- a/utils/gen_adldata/file_formats/load_wopl.h +++ b/utils/gen_adldata/file_formats/load_wopl.h @@ -176,11 +176,11 @@ static bool LoadWopl(const char *fn, unsigned bank, const char *prefix) tmp[0].diff = false; tmp[1].diff = real4op && !tmp2.pseudo4op; - int fine_tune = (int)data[offset + 37]; + int8_t fine_tune = (int8_t)data[offset + 37]; if(fine_tune != 0) { // Simulate behavior of DMX second voice detune - tmp2.voice2_fine_tune = (double)((fine_tune >> 1) - 64) / 32.0; + tmp2.voice2_fine_tune = (double)((((int)fine_tune + 128) >> 1) - 64) / 32.0; } uint32_t gmno = is_percussion ? i + 128 : i; |