diff options
author | Wohlstand <admin@wohlnet.ru> | 2025-03-25 22:14:33 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2025-03-25 22:14:33 +0300 |
commit | 7f6a54208bc9da2b100ef1a6d5ddbf19516aedd6 (patch) | |
tree | b15010aa755b85200435c32066e1de577e9988d6 /src | |
parent | 6dfe12b402d210554d834b1f595c821c299faecd (diff) | |
download | libADLMIDI-7f6a54208bc9da2b100ef1a6d5ddbf19516aedd6.tar.gz libADLMIDI-7f6a54208bc9da2b100ef1a6d5ddbf19516aedd6.tar.bz2 libADLMIDI-7f6a54208bc9da2b100ef1a6d5ddbf19516aedd6.zip |
Fixed instruments distortion on OPL2 chips
Diffstat (limited to 'src')
-rw-r--r-- | src/adlmidi_opl3.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/adlmidi_opl3.cpp b/src/adlmidi_opl3.cpp index 48a7d20..cc3718d 100644 --- a/src/adlmidi_opl3.cpp +++ b/src/adlmidi_opl3.cpp @@ -1538,6 +1538,9 @@ void OPL3::setPatch(size_t c, const OplTimbre &instrument) if(o2 != 0xFFF) writeRegI(chip, data[a] + o2, y & 0xFF); } + + if(m_currentChipType == OPLChipBase::CHIPTYPE_OPL2) + writeRegI(chip, 0xC0 + g_channelsMapPan[cc], instrument.feedconn); } void OPL3::setPan(size_t c, uint8_t value) @@ -1899,7 +1902,8 @@ void OPL3::initChip(size_t chip) static const uint16_t data_opl2[] = { 0x004, 96, 0x004, 128, // Pulse timer - 0x001, 32 // Enable wave + 0x001, 32, // Enable wave + 0x08, 0 // CSW/Note Sel }; static const size_t data_opl2_size = sizeof(data_opl2) / sizeof(uint16_t); |