diff options
author | Wohlstand <admin@wohlnet.ru> | 2016-12-07 18:56:26 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2016-12-07 18:56:26 +0300 |
commit | fb22d6c8bb89a398b36496ecdc29fbb80f8ec77c (patch) | |
tree | c1f697b9c45031b4d588854012bd723bb20078fb /src/dbopl.cpp | |
parent | d538d57803c7651a36a720eb4ae4d53fb0efacab (diff) | |
download | libADLMIDI-fb22d6c8bb89a398b36496ecdc29fbb80f8ec77c.tar.gz libADLMIDI-fb22d6c8bb89a398b36496ecdc29fbb80f8ec77c.tar.bz2 libADLMIDI-fb22d6c8bb89a398b36496ecdc29fbb80f8ec77c.zip |
Ooops
Fixed wrong generated sound in some cases.
DBOPL has own constructors to initialize it's fields. memset no need here
Diffstat (limited to 'src/dbopl.cpp')
-rw-r--r-- | src/dbopl.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/dbopl.cpp b/src/dbopl.cpp index 1f2f397..e534c99 100644 --- a/src/dbopl.cpp +++ b/src/dbopl.cpp @@ -1203,6 +1203,23 @@ namespace DBOPL regBD = 0; reg104 = 0; opl3Active = 0; + //Extra zeros! + vibratoIndex = 0; + tremoloIndex = 0; + vibratoSign = 0; + vibratoShift = 0; + tremoloValue = 0; + vibratoStrength = 0; + tremoloStrength = 0; + waveFormMask = 0; + lfoCounter = 0; + lfoAdd = 0; + noiseCounter = 0; + noiseAdd = 0; + noiseValue = 0; + memset(freqMul, 0, sizeof(Bit32u) * 16); + memset(linearRates, 0, sizeof(Bit32u) * 76); + memset(attackRates, 0, sizeof(Bit32u) * 76); } INLINE Bit32u Chip::ForwardNoise() |