| 1136 | } |
| 1137 | |
| 1138 | void Looper::CheckboxUpdated(Checkbox* checkbox, double time) |
| 1139 | { |
| 1140 | if (checkbox == mAllowScratchCheckbox) |
| 1141 | { |
| 1142 | if (mAllowScratch == false) |
| 1143 | { |
| 1144 | mScratchSpeed = 1; |
| 1145 | mLoopPosOffset = 0; |
| 1146 | } |
| 1147 | } |
| 1148 | if (checkbox == mMuteCheckbox) |
| 1149 | { |
| 1150 | SetMute(time, mMute); |
| 1151 | } |
| 1152 | if (checkbox == mWriteInputCheckbox) |
| 1153 | { |
| 1154 | if (mWriteInput) |
| 1155 | { |
| 1156 | if (mBufferTempo != TheTransport->GetTempo()) |
| 1157 | ResampleForSpeed(GetPlaybackSpeed()); |
| 1158 | mWriteInputRamp.Start(time, 1, time + 10); |
| 1159 | } |
| 1160 | else |
| 1161 | { |
| 1162 | mWriteInputRamp.Start(time, 0, time + 10); |
| 1163 | } |
| 1164 | } |
| 1165 | } |
| 1166 | |
| 1167 | void Looper::HalveNumBars() |
| 1168 | { |