mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 16:47:31 -05:00
Merge master and re-apply the source event structures to the DFT processor.
This commit is contained in:
@@ -21,8 +21,8 @@ import io.github.dsheirer.properties.SystemProperties;
|
||||
import io.github.dsheirer.sample.Listener;
|
||||
import io.github.dsheirer.sample.SampleType;
|
||||
import io.github.dsheirer.sample.complex.ComplexBuffer;
|
||||
import io.github.dsheirer.source.tuner.frequency.FrequencyChangeEvent;
|
||||
import io.github.dsheirer.source.tuner.frequency.IFrequencyChangeProcessor;
|
||||
import io.github.dsheirer.source.ISourceEventProcessor;
|
||||
import io.github.dsheirer.source.SourceEvent;
|
||||
import io.github.dsheirer.spectrum.converter.DFTResultsConverter;
|
||||
import io.github.dsheirer.util.ThreadPool;
|
||||
import org.jtransforms.fft.FloatFFT_1D;
|
||||
@@ -40,15 +40,15 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
* Processes both complex samples or float samples and dispatches a float array of DFT results, using configurable fft
|
||||
* size and output dispatch timelines.
|
||||
*/
|
||||
public class DFTProcessor implements Listener<ComplexBuffer>, IFrequencyChangeProcessor, IDFTWidthChangeProcessor
|
||||
public class DFTProcessor implements Listener<ComplexBuffer>, ISourceEventProcessor, IDFTWidthChangeProcessor
|
||||
{
|
||||
private static final Logger mLog = LoggerFactory.getLogger(DFTProcessor.class);
|
||||
private static final int BUFFER_QUEUE_MAX_SIZE = 12;
|
||||
private static final int BUFFER_QUEUE_OVERFLOW_RESET_THRESHOLD = 6;
|
||||
private static final String FRAME_RATE_PROPERTY = "spectral.display.frame.rate";
|
||||
|
||||
//The Cosine and Hanning windows seem to offer the best spectral display with minimal bin leakage/smearing
|
||||
private WindowType mWindowType = Window.WindowType.HANNING;
|
||||
//The Cosine and Hann windows seem to offer the best spectral display with minimal bin leakage/smearing
|
||||
private WindowType mWindowType = WindowType.HANN;
|
||||
private double[] mWindow;
|
||||
private DFTSize mDFTSize = DFTSize.FFT04096;
|
||||
private DFTSize mNewDFTSize = DFTSize.FFT04096;
|
||||
@@ -289,7 +289,7 @@ public class DFTProcessor implements Listener<ComplexBuffer>, IFrequencyChangePr
|
||||
}
|
||||
|
||||
@Override
|
||||
public void frequencyChanged(FrequencyChangeEvent event)
|
||||
public void process(SourceEvent event)
|
||||
{
|
||||
switch(event.getEvent())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user