MCPcopy Create free account
hub / github.com/doldecomp/mkdd / effect

Method effect

libs/JSystem/JAudio/System/JASInstRand.cpp:5–34  ·  view source on GitHub ↗

probably fakematch

Source from the content-addressed store, hash-verified

3
4// probably fakematch
5void JASInstRand::effect(int, int, JASSoundParams *params) const
6{
7 static JMath::TRandom_fast_ oRandom(0);
8 f32 val = (FLT_EPSILON); // has to be declared here to prevent regswaps
9 val = getY(1.0f - val, oRandom.get_ufloat_1() * 2.0f, 1.0f);
10 val *= mCeiling;
11 val += mFloor;
12
13 switch(mType) {
14 case 0:
15 params->mVolume *= val;
16 break;
17 case 1:
18 params->mPitch *= val;
19 break;
20 case 2:
21 params->mPan += val - 0.5; // yes, they forgot the f
22 break;
23 case 3:
24 params->mFxMix += val;
25 break;
26 case 4:
27 params->mDolby += val;
28 break;
29 default:
30#line 42
31 JUT_ASSERT(0);
32 break;
33 }
34}

Callers 2

getParamMethod · 0.45
getParamMethod · 0.45

Calls 1

get_ufloat_1Method · 0.80

Tested by

no test coverage detected