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

Method effectOsc

libs/JSystem/JAudio/System/JASChannel.cpp:131–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131void JASChannel::effectOsc(u32 oscnum, JASOscillator::EffectParams *effectParams) {
132#line 165
133 JUT_ASSERT(oscnum < OSC_NUM);
134 f32 value = mOscillators[oscnum].getValue();
135 switch (mOscillators[oscnum].getTarget()) {
136 case JASOscillator::TARGET_PITCH:
137 effectParams->mPitch *= value;
138 break;
139 case JASOscillator::TARGET_VOLUME:
140 effectParams->mVolume *= value;
141 break;
142 case JASOscillator::TARGET_PAN:
143 value -= 0.5;
144 effectParams->mPan += value;
145 break;
146 case JASOscillator::TARGET_FXMIX:
147 effectParams->mFxMix += value;
148 break;
149 case JASOscillator::TARGET_DOLBY:
150 effectParams->mDolby += value;
151 break;
152 case JASOscillator::TARGET_5:
153 effectParams->_14 *= value;
154 break;
155 case JASOscillator::TARGET_6:
156 effectParams->_18 *= value;
157 break;
158 default:
159#line 194
160 JUT_WARNING_F2("%s", "Invalid osc target");
161 break;
162 }
163}
164
165void JASChannel::copyOsc(u32 oscnum, JASOscillator::Data *oscData) {
166 // UNUSED, fabricated

Callers

nothing calls this directly

Calls 2

getTargetMethod · 0.80
getValueMethod · 0.45

Tested by

no test coverage detected