| 781 | } |
| 782 | |
| 783 | void SamplePlayer::OnClicked(float x, float y, bool right) |
| 784 | { |
| 785 | IDrawableModule::OnClicked(x, y, right); |
| 786 | |
| 787 | if (right) |
| 788 | return; |
| 789 | |
| 790 | if (mYoutubeSearchResults.size() > 0) |
| 791 | return; |
| 792 | |
| 793 | if (y > 60 && y < mHeight - 20 && mSample != nullptr && gHoveredUIControl == nullptr) |
| 794 | { |
| 795 | mSwitchAndRamp.StartSwitch(); |
| 796 | mCuePointSpeed = 1; |
| 797 | mStopOnNoteOff = false; |
| 798 | mPlay = true; |
| 799 | mAdsr.Clear(); |
| 800 | mAdsr.Start(NextBufferTime(false), 1); |
| 801 | mSample->SetPlayPosition(int(GetPlayPositionForMouse(x))); |
| 802 | mScrubbingSample = true; |
| 803 | |
| 804 | if (mSetCuePoint) |
| 805 | SetCuePointForX(x); |
| 806 | } |
| 807 | } |
| 808 | |
| 809 | ChannelBuffer* SamplePlayer::GetCueSampleData(int cueIndex) |
| 810 | { |
nothing calls this directly
no test coverage detected