MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / CheckboxUpdated

Method CheckboxUpdated

Source/Looper.cpp:1138–1165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1136}
1137
1138void 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
1167void Looper::HalveNumBars()
1168{

Callers

nothing calls this directly

Calls 2

GetTempoMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected