Updates the NBFM decoder to allow user to select between 12.5 and 25.0

kHz channel bandwidth so that 25 kHz channels can be demodulated correctly.
This commit is contained in:
Denny
2018-09-16 07:21:14 -04:00
parent dae68515a5
commit a17132be0d
18 changed files with 362 additions and 225 deletions

View File

@@ -340,13 +340,13 @@ public class TunerModel extends AbstractTableModel implements Listener<TunerEven
*
* Returns null if no tuner can source the channel
*/
public Source getSource(SourceConfigTuner config, int bandwidth, ChannelSpecification channelSpecification)
public Source getSource(SourceConfigTuner config, ChannelSpecification channelSpecification)
{
TunerChannelSource retVal = null;
TunerChannel tunerChannel = config.getTunerChannel();
tunerChannel.setBandwidth(bandwidth);
tunerChannel.setBandwidth(channelSpecification.getBandwidth());
Iterator<Tuner> it = mTuners.iterator();

View File

@@ -21,18 +21,21 @@ package io.github.dsheirer.source.tuner.channel;
public class ChannelSpecification
{
private double mMinimumSampleRate;
private int mBandwidth;
private double mPassFrequency;
private double mStopFrequency;
/**
* Constructs a channel specification instance.
* @param minimumSampleRate requested for the channel
* @param bandwidth
* @param passFrequency for the pass band of the channel
* @param stopFrequency for the stop band of teh channel
*/
public ChannelSpecification(double minimumSampleRate, double passFrequency, double stopFrequency)
public ChannelSpecification(double minimumSampleRate, int bandwidth, double passFrequency, double stopFrequency)
{
mMinimumSampleRate = minimumSampleRate;
mBandwidth = bandwidth;
mPassFrequency = passFrequency;
mStopFrequency = stopFrequency;
}
@@ -45,6 +48,14 @@ public class ChannelSpecification
return mMinimumSampleRate;
}
/**
* Bandwidth of the channel in Hertz
*/
public int getBandwidth()
{
return mBandwidth;
}
/**
* Pass band frequency for filtering the channel
*/