diff options
author | Wohlstand <admin@wohlnet.ru> | 2019-07-02 19:58:32 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2019-07-02 19:58:32 +0300 |
commit | 06769afda989539d8b5b801edcd30a95ac8330ce (patch) | |
tree | ab37f3be13fca0afc5057a5ba8009d413de71261 /utils/gen_adldata | |
parent | bf9255e78e18675ab5ac3f4aa03fa55ebce92920 (diff) | |
download | libADLMIDI-06769afda989539d8b5b801edcd30a95ac8330ce.tar.gz libADLMIDI-06769afda989539d8b5b801edcd30a95ac8330ce.tar.bz2 libADLMIDI-06769afda989539d8b5b801edcd30a95ac8330ce.zip |
Don't pass useless data to the chip
Diffstat (limited to 'utils/gen_adldata')
-rw-r--r-- | utils/gen_adldata/measurer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/gen_adldata/measurer.cpp b/utils/gen_adldata/measurer.cpp index 2deebc9..c8b4246 100644 --- a/utils/gen_adldata/measurer.cpp +++ b/utils/gen_adldata/measurer.cpp @@ -152,7 +152,7 @@ struct TinySynth void resetChip() { - static const short initdata[(2 + 3 + 2 + 2) * 2] = + static const short initdata[] = { 0x004, 96, 0x004, 128, // Pulse timer 0x105, 0, 0x105, 1, 0x105, 0, // Pulse OPL3 enable, leave disabled @@ -163,7 +163,7 @@ struct TinySynth for(size_t a = 0; a < 18; ++a) m_chip->writeReg(0xB0 + g_channelsMap[a], 0x00); - for(unsigned a = 0; a < 18; a += 2) + for(unsigned a = 0; a < sizeof(initdata) / sizeof(*initdata); a += 2) m_chip->writeReg((uint16_t)initdata[a], (uint8_t)initdata[a + 1]); } |