| 136 | } |
| 137 | |
| 138 | void PulseTrain::Step(double time, float velocity, int flags) |
| 139 | { |
| 140 | if (!mEnabled) |
| 141 | return; |
| 142 | |
| 143 | const bool isReset = (flags & kPulseFlag_Reset); |
| 144 | if (isReset) |
| 145 | mStep = 0; |
| 146 | |
| 147 | if (mStep >= mLength) |
| 148 | return; |
| 149 | |
| 150 | if (mStep < mLength) |
| 151 | { |
| 152 | float v = mVels[mStep] * velocity; |
| 153 | |
| 154 | int new_flags = 0; |
| 155 | if (mResetOnStart && mStep == 0) |
| 156 | new_flags = kPulseFlag_Reset; |
| 157 | |
| 158 | if (v > 0) |
| 159 | { |
| 160 | DispatchPulse(GetPatchCableSource(), time, v, new_flags); |
| 161 | |
| 162 | if (mStep < kMaxSteps) |
| 163 | DispatchPulse(mStepCables[mStep], time, v, new_flags); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | if (mStep < mLength) |
| 168 | mVelocityGrid->SetHighlightCol(time, mStep); |
| 169 | else |
| 170 | mVelocityGrid->SetHighlightCol(time, -1); |
| 171 | |
| 172 | ++mStep; |
| 173 | } |
| 174 | |
| 175 | void PulseTrain::GetModuleDimensions(float& width, float& height) |
| 176 | { |
nothing calls this directly
no test coverage detected