| 131 | } |
| 132 | |
| 133 | void LFO::SetPeriod(NoteInterval interval) |
| 134 | { |
| 135 | if (interval == kInterval_Free) |
| 136 | mFreePhase = CalculatePhase(); |
| 137 | |
| 138 | mPeriod = interval; |
| 139 | if (mOsc.GetType() == kOsc_Random) |
| 140 | { |
| 141 | TransportListenerInfo* transportListenerInfo = TheTransport->GetListenerInfo(this); |
| 142 | if (transportListenerInfo != nullptr) |
| 143 | transportListenerInfo->mInterval = mPeriod; |
| 144 | } |
| 145 | |
| 146 | if (mOsc.GetType() == kOsc_Drunk || mPeriod == kInterval_Free) |
| 147 | TheTransport->AddAudioPoller(this); |
| 148 | else |
| 149 | TheTransport->RemoveAudioPoller(this); |
| 150 | } |
| 151 | |
| 152 | void LFO::SetType(OscillatorType type) |
| 153 | { |
no test coverage detected