mirror of
https://github.com/xdsopl/robot36.git
synced 2026-01-04 15:29:59 +01:00
use arraycopy
This commit is contained in:
parent
445a84a5d2
commit
74d98689c3
|
|
@ -223,15 +223,13 @@ public class Decoder {
|
|||
private void shiftSamples(int shift) {
|
||||
if (shift <= 0 || shift > curSample)
|
||||
return;
|
||||
curSample -= shift;
|
||||
leaderBreakIndex -= shift;
|
||||
lastSyncPulseIndex -= shift;
|
||||
adjustSyncPulses(last5msSyncPulses, shift);
|
||||
adjustSyncPulses(last9msSyncPulses, shift);
|
||||
adjustSyncPulses(last20msSyncPulses, shift);
|
||||
int endSample = curSample;
|
||||
curSample = 0;
|
||||
for (int i = shift; i < endSample; ++i)
|
||||
scanLineBuffer[curSample++] = scanLineBuffer[i];
|
||||
System.arraycopy(scanLineBuffer, shift, scanLineBuffer, 0, curSample);
|
||||
}
|
||||
|
||||
private boolean handleHeader() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue