MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / modulateVolumeWaveform

Method modulateVolumeWaveform

Source/Amiga/rjp1.cpp:445–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445void Rjp1::modulateVolumeWaveform(Rjp1Channel *channel) {
446 if (channel->modulateVolumeData) {
447 uint32 i = channel->modulateVolumeIndex;
448 channel->volume += channel->modulateVolumeData[i] * channel->volume / 128;
449 ++i;
450 if (i == channel->modulateVolumeLimit) {
451 i = channel->modulateVolumeBase * 2;
452 }
453 channel->modulateVolumeIndex = i;
454 }
455}
456
457template<typename T> inline T CLIP(T v, T amin, T amax) {
458 if (v < amin) return amin; else if (v > amax) return amax; else return v;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected