| 248 | } |
| 249 | |
| 250 | void ControllingSong::ButtonClicked(ClickButton* button, double time) |
| 251 | { |
| 252 | if (button == mNextSongButton) |
| 253 | mNeedNewSong = true; |
| 254 | if (button == mPhraseForwardButton || button == mPhraseBackButton) |
| 255 | { |
| 256 | int position = mSample.GetPlayPosition(); |
| 257 | int jumpAmount = TheTransport->GetDuration(kInterval_4) / gInvSampleRateMs * mSample.GetSampleRateRatio(); |
| 258 | if (button == mPhraseBackButton) |
| 259 | jumpAmount *= -1; |
| 260 | int newPosition = position + jumpAmount; |
| 261 | if (newPosition < 0) |
| 262 | newPosition = 0; |
| 263 | mSample.SetPlayPosition(newPosition); |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | void ControllingSong::CheckboxUpdated(Checkbox* checkbox, double time) |
| 268 | { |
nothing calls this directly
no test coverage detected