diff options
author | Vitaly Novichkov <Wohlstand@users.noreply.github.com> | 2019-02-27 00:27:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-27 00:27:45 +0300 |
commit | 9b63225a5ebbf82e27229443b8912512e407ef99 (patch) | |
tree | 490e9cb20caeaa1211f5cc92291daf9980832b26 | |
parent | e86fd03b395857996fb6e4e7374186ea499bebaf (diff) | |
parent | 45591c113d3f608b024e392e2baea6b8d96ebb8d (diff) | |
download | libADLMIDI-9b63225a5ebbf82e27229443b8912512e407ef99.tar.gz libADLMIDI-9b63225a5ebbf82e27229443b8912512e407ef99.tar.bz2 libADLMIDI-9b63225a5ebbf82e27229443b8912512e407ef99.zip |
Merge pull request #214 from jpcima/bugfix
Bugfix
-rw-r--r-- | src/chips/java/JavaOPL3.hpp | 8 | ||||
-rw-r--r-- | src/chips/opal/opal.hpp | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/chips/java/JavaOPL3.hpp b/src/chips/java/JavaOPL3.hpp index e9772d6..17aff80 100644 --- a/src/chips/java/JavaOPL3.hpp +++ b/src/chips/java/JavaOPL3.hpp @@ -1002,7 +1002,7 @@ static double EnvelopeFromDB(double db) Channel::Channel (int baseAddress, double startvol) { channelBaseAddress = baseAddress; - fnuml = fnumh = kon = block = fb = cnt = 0; + fnuml = fnumh = kon = block = fb = cha = chb = cnt = 0; feedback[0] = feedback[1] = 0; leftPan = rightPan = startvol; } @@ -1230,7 +1230,7 @@ const double Operator::noModulator = 0; Operator::Operator(int baseAddress) { operatorBaseAddress = baseAddress; - envelope = 0; + envelope = phase = 0; am = vib = ksr = egt = mult = ksl = tl = ar = dr = sl = rr = ws = 0; keyScaleNumber = f_number = block = 0; } @@ -1641,6 +1641,8 @@ double TopCymbalOperator::getOperatorOutput(OPL3 *OPL3, double modulator) { // Conversely, this method is also used through inheritance by the HighHatOperator, // now with the TopCymbalOperator phase as the externalPhase. double TopCymbalOperator::getOperatorOutput(OPL3 *OPL3, double modulator, double externalPhase) { + (void)modulator; + double envelopeInDB = envelopeGenerator.getEnvelope(OPL3, egt, am); envelope = EnvelopeFromDB(envelopeInDB); @@ -1661,8 +1663,6 @@ double TopCymbalOperator::getOperatorOutput(OPL3 *OPL3, double modulator, double if( chopped > 0.1) carrierOutput = 0; return carrierOutput*2; - - (void)modulator; } HighHatOperator::HighHatOperator() diff --git a/src/chips/opal/opal.hpp b/src/chips/opal/opal.hpp index c6976db..511760c 100644 --- a/src/chips/opal/opal.hpp +++ b/src/chips/opal/opal.hpp @@ -329,6 +329,7 @@ void Opal::Init(int sample_rate) { Clock = 0; TremoloClock = 0; + TremoloLevel = 0; VibratoTick = 0; VibratoClock = 0; NoteSel = false; |