Initial commit of redesigned internal processing and audio management.

Note: Several of the decoders are currently non-functioning in this
commit.  If you want the latest functioning codebase, please checkout
the commit prior to this one.  All decoders will eventually be updated
with this new architecture.

Currently broken:
- Logging and recording
- Aux decoders (Fleetsync/MDC/LoJack/Tait)
- LTR/Passport decoders

Changes in this commit:
- Module architecture for decoders and components with central
provisioning by the DecoderFactory
- Transition from Complex sample stream processing to float buffer
processing for improved memory management
- Redesigned filter structures - to support buffers and streams
- Resolved several memory leak issues
- Universal sharing of the thread pool manager
- Added centralized audio management with call/user prioritization and
new gui with mute/volume controls
- Embedded audio metadata for eventual streaming support
- Redesigned ProcessingChain to support independent re-use
- Added new TrafficChannelManager to handle traffic channel allocations
- Traffic Channel pool size and Call timeout available in P25 and
MPT1327 configs
- Redesigned channel and decoder gui components
This commit is contained in:
denny
2015-09-01 07:10:26 -04:00
parent 538a299246
commit f4d8ea281d
570 changed files with 21578 additions and 17012 deletions

View File

@@ -26,7 +26,7 @@ import java.util.BitSet;
import java.util.List;
import sample.Listener;
import sample.real.RealSampleListener;
import sample.real.RealBuffer;
import buffer.BooleanAveragingBuffer;
import dsp.symbol.SymbolEvent;
import dsp.symbol.SymbolEvent.Shift;
@@ -51,7 +51,7 @@ import dsp.symbol.SymbolEvent.Shift;
* Implements instrumentable interface, so that slice events can be received
* externally to analyze decoder performance.
*/
public class FSK2Decoder implements Instrumentable, RealSampleListener
public class FSK2Decoder implements Instrumentable, Listener<RealBuffer>
{
public enum Output{ NORMAL, INVERTED };
@@ -95,23 +95,26 @@ public class FSK2Decoder implements Instrumentable, RealSampleListener
* Primary sample input
*/
@Override
public void receive( float floatSample )
public void receive( RealBuffer buffer )
{
/* Square the sample. Greater than zero is a 1 (true) and less than
* zero is a 0 (false) */
boolean bitSample = ( floatSample >= 0.0f );
for( float sample: buffer.getSamples() )
{
/* Square the sample. Greater than zero is a 1 (true) and less than
* zero is a 0 (false) */
boolean bitSample = ( sample >= 0.0f );
/* Feed the delay buffer and fetch the one-baud delayed sample */
boolean delayedBitSample = mDelayBuffer.get( bitSample );
/* Feed the delay buffer and fetch the one-baud delayed sample */
boolean delayedBitSample = mDelayBuffer.get( bitSample );
/* Correlation: xor current bit with delayed bit */
boolean softBit = bitSample ^ delayedBitSample;
/* Correlation: xor current bit with delayed bit */
boolean softBit = bitSample ^ delayedBitSample;
/* Low pass filter to smooth the correlated values */
boolean filteredSoftBit = mLowPassFilter.getAverage( softBit );
/* Low pass filter to smooth the correlated values */
boolean filteredSoftBit = mLowPassFilter.getAverage( softBit );
/* Send the filtered correlated bit to the slicer */
mSlicer.receive( filteredSoftBit );
/* Send the filtered correlated bit to the slicer */
mSlicer.receive( filteredSoftBit );
}
}
/**

View File

@@ -27,17 +27,17 @@ import java.util.ArrayList;
import java.util.List;
import sample.Listener;
import sample.real.RealSampleListener;
import dsp.filter.DCRemovalFilter3;
import sample.real.RealBuffer;
import dsp.filter.Filters;
import dsp.filter.FloatHalfBandFilter;
import dsp.filter.FloatHalfBandNoDecimateFilter;
import dsp.filter.LTRPulseShapingFilter;
import dsp.filter.SquaringFilter;
import dsp.filter.dc.IIRSinglePoleDCRemovalFilter;
import dsp.symbol.Slicer;
import dsp.symbol.Slicer.Output;
public class LTRFSKDecoder implements RealSampleListener, Instrumentable
public class LTRFSKDecoder implements Listener<RealBuffer>, Instrumentable
{
private FloatHalfBandFilter mHBFilter1;
private FloatHalfBandFilter mHBFilter2;
@@ -45,7 +45,7 @@ public class LTRFSKDecoder implements RealSampleListener, Instrumentable
private FloatHalfBandFilter mHBFilter4;
private FloatHalfBandFilter mHBFilter5;
private FloatHalfBandNoDecimateFilter mHBFilter6;
private DCRemovalFilter3 mDCFilter;
private IIRSinglePoleDCRemovalFilter mDCFilter;
private SquaringFilter mSquaringFilter;
private LTRPulseShapingFilter mPulseShaper;
private Slicer mSlicer;
@@ -69,29 +69,29 @@ public class LTRFSKDecoder implements RealSampleListener, Instrumentable
public LTRFSKDecoder()
{
mHBFilter1 = new FloatHalfBandFilter(
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002 );
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002f );
mHBFilter2 = new FloatHalfBandFilter(
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002 );
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002f );
mHBFilter1.setListener( mHBFilter2 );
mHBFilter3 = new FloatHalfBandFilter(
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002 );
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002f );
mHBFilter2.setListener( mHBFilter3 );
mHBFilter4 = new FloatHalfBandFilter(
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002 );
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002f );
mHBFilter3.setListener( mHBFilter4 );
mHBFilter5 = new FloatHalfBandFilter(
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002 );
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002f );
mHBFilter4.setListener( mHBFilter5 );
mHBFilter6 = new FloatHalfBandNoDecimateFilter(
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002 );
Filters.FIR_HALF_BAND_31T_ONE_EIGHTH_FCO, 1.1002f );
mHBFilter5.setListener( mHBFilter6 );
mDCFilter = new DCRemovalFilter3( 0.9946f );
mDCFilter = new IIRSinglePoleDCRemovalFilter( 0.9946f );
mHBFilter6.setListener( mDCFilter );
mSquaringFilter = new SquaringFilter();
@@ -105,9 +105,12 @@ public class LTRFSKDecoder implements RealSampleListener, Instrumentable
}
@Override
public void receive( float sample )
public void receive( RealBuffer buffer )
{
mHBFilter1.receive( sample );
for( float sample: buffer.getSamples() )
{
mHBFilter1.receive( sample );
}
}
public void addListener( Listener<Boolean> listener )