mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Closes #7 NXDN Decoder * Implements: NXDN4800, NXDN9600, Type-C and Type-D decoding and trunk tracking. * Redesigns tuner and channel frequency error management.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* *****************************************************************************
|
||||
* Copyright (C) 2014-2023 Dennis Sheirer
|
||||
* Copyright (C) 2014-2026 Dennis Sheirer
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -98,6 +98,33 @@ public class FloatCircularBuffer
|
||||
return values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all sample values in reverse order.
|
||||
*/
|
||||
public float[] getAllReversed()
|
||||
{
|
||||
int valuePointer = 0;
|
||||
float[] values = new float[mBuffer.length];
|
||||
int bufferPointer = mBufferPointer - 1;
|
||||
|
||||
if(bufferPointer < 0)
|
||||
{
|
||||
bufferPointer = mBuffer.length - 1;
|
||||
}
|
||||
|
||||
while(valuePointer < values.length)
|
||||
{
|
||||
values[valuePointer++] = mBuffer[bufferPointer--];
|
||||
|
||||
if(bufferPointer < 0)
|
||||
{
|
||||
bufferPointer = mBuffer.length - 1;
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Places the new value into the buffer, overwriting the oldest value
|
||||
* @param newValue to add to the buffer
|
||||
|
||||
Reference in New Issue
Block a user