From 555840133a86e23df62b82a06c3142d658c04c1e Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Tue, 26 Feb 2019 20:05:22 +0100 Subject: java: initialize cha and chb (CID 1477237) --- src/chips/java/JavaOPL3.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chips/java/JavaOPL3.hpp') diff --git a/src/chips/java/JavaOPL3.hpp b/src/chips/java/JavaOPL3.hpp index e9772d6..fa9c8d7 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; } -- cgit v1.2.3 From c70b39065b1bf5b8b39bc104b351512203847d8b Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Tue, 26 Feb 2019 20:06:57 +0100 Subject: java: fix unreachable code false-positive (CID 1477236) --- src/chips/java/JavaOPL3.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/chips/java/JavaOPL3.hpp') diff --git a/src/chips/java/JavaOPL3.hpp b/src/chips/java/JavaOPL3.hpp index fa9c8d7..88d9ebe 100644 --- a/src/chips/java/JavaOPL3.hpp +++ b/src/chips/java/JavaOPL3.hpp @@ -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() -- cgit v1.2.3 From 45591c113d3f608b024e392e2baea6b8d96ebb8d Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Tue, 26 Feb 2019 20:09:07 +0100 Subject: java: initialize phase (CID 1477241) --- src/chips/java/JavaOPL3.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chips/java/JavaOPL3.hpp') diff --git a/src/chips/java/JavaOPL3.hpp b/src/chips/java/JavaOPL3.hpp index 88d9ebe..17aff80 100644 --- a/src/chips/java/JavaOPL3.hpp +++ b/src/chips/java/JavaOPL3.hpp @@ -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; } -- cgit v1.2.3