330 - Adds new JavaFX implementation of the demodulator viewer applicaiton

with initial support for playback control and I/Q sample axis viewing.
This commit is contained in:
Denny
2018-02-11 10:16:50 -05:00
parent 03e39f3343
commit 1406d5576a
8 changed files with 449 additions and 96 deletions

View File

@@ -21,14 +21,13 @@ public class ConversionUtils
*/
public static float[] convertFromSigned16BitSamples( ByteBuffer buffer )
{
ShortBuffer byteBuffer =
buffer.order( ByteOrder.LITTLE_ENDIAN ).asShortBuffer();
ShortBuffer byteBuffer = buffer.order( ByteOrder.LITTLE_ENDIAN ).asShortBuffer();
float[] samples = new float[ buffer.limit() / 2 ];
for( int x = 0; x < samples.length; x++ )
{
samples[ x ] = (float)byteBuffer.get() / 32767.0f;
samples[ x ] = (float)byteBuffer.get() / (float)Short.MAX_VALUE;
}
return samples;