mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
Adds airspy USB tuner support and updates the spectral display
component. -Airspy supported with 10 and 2.5 MSps sample rates. Additional decimation may be added later. -Spectral display updated to include smoothing and filtering options. Note: the decimated output of a tuner channel from the airspy is 48,076.9 samples per second, versus the normal 48 kHz decimated rate. This is 1.0015 times the normal rate and doesn't appear to impact the decoders or audio processing. Therefore, no fractional resampling has been added.
This commit is contained in:
@@ -1,21 +1,17 @@
|
||||
package sample.complex;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.nio.ByteOrder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class ComplexBuffer
|
||||
import sample.Buffer;
|
||||
|
||||
public class ComplexBuffer extends Buffer
|
||||
{
|
||||
private float[] mSamples;
|
||||
|
||||
/**
|
||||
* Wrapper around float array containing interleaved I/Q samples
|
||||
*/
|
||||
public ComplexBuffer( float[] samples )
|
||||
{
|
||||
mSamples = samples;
|
||||
super( samples );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -27,35 +23,4 @@ public class ComplexBuffer
|
||||
|
||||
return new ComplexBuffer( copy );
|
||||
}
|
||||
|
||||
/**
|
||||
* Interleaved I/Q float sample array
|
||||
*/
|
||||
public float[] getSamples()
|
||||
{
|
||||
return mSamples;
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts this sample buffer into a list of complex samples
|
||||
*/
|
||||
public List<Complex> getComplexSamples()
|
||||
{
|
||||
List<Complex> samples = new ArrayList<Complex>();
|
||||
|
||||
for( int x = 0; x < mSamples.length; x += 2 )
|
||||
{
|
||||
samples.add( new Complex( mSamples[ x ], mSamples[ x + 1 ] ) );
|
||||
}
|
||||
|
||||
return samples;
|
||||
}
|
||||
|
||||
/**
|
||||
* Cleanup method to nullify all data and references
|
||||
*/
|
||||
public void dispose()
|
||||
{
|
||||
mSamples = null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user