fix edit crash

This commit is contained in:
Alexey Kuznetsov 2018-12-21 12:11:41 +03:00
commit d3de2ff202

View file

@ -589,7 +589,11 @@ public class RecordingActivity extends AppCompatThemeActivity {
float x = event.getX();
if (x < 0)
x = 0;
editSample = pitch.edit(x) * recording.samplesUpdate;
long edit = pitch.edit(x);
if (edit == -1)
edit(false, false);
else
editSample = pitch.edit(x) * recording.samplesUpdate;
return true;
}
});