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

@@ -40,7 +40,7 @@
*/
package util;
import sample.complex.ComplexSample;
import sample.complex.Complex;
public class ArcTangent
{
@@ -124,7 +124,7 @@ public class ArcTangent
* @param sample representing polar coordinates
* @return - angle in radians
*/
public static double getAngle( ComplexSample sample )
public static double getAngle( Complex sample )
{
return getAngle( ( (double) sample.inphase() ),
( (double) sample.quadrature() ) );

View File

@@ -17,15 +17,15 @@
******************************************************************************/
package util;
import sample.complex.ComplexSample;
import sample.complex.Complex;
public class Oscillator
{
private double mFrequency;
private double mSampleRate;
private ComplexSample mAnglePerSample;
private ComplexSample mCurrentAngle = new ComplexSample( 0.0f, -1.0f );
private Complex mAnglePerSample;
private Complex mCurrentAngle = new Complex( 0.0f, -1.0f );
/**
* Oscillator produces complex or float samples corresponding to a sine wave
@@ -42,17 +42,15 @@ public class Oscillator
update();
}
public ComplexSample getCurrentAngle()
{
return mCurrentAngle;
}
/**
* Updates the internal values after a frequency or sample rate change
*/
private void update()
{
float anglePerSample =
(float)( 2.0d * Math.PI * mFrequency / mSampleRate );
mAnglePerSample = ComplexSample.fromAngle( anglePerSample );
mAnglePerSample = Complex.fromAngle( anglePerSample );
}
/**
@@ -76,37 +74,35 @@ public class Oscillator
/**
* Steps the current angle by the angle per sample amount
*/
private void rotate()
public void rotate()
{
mCurrentAngle.multiply( mAnglePerSample );
mCurrentAngle.fastNormalize();
}
public float inphase()
{
return mCurrentAngle.inphase();
}
public float quadrature()
{
return mCurrentAngle.quadrature();
}
/**
* Get next complex sample
*/
public ComplexSample nextComplex()
public Complex getComplex()
{
rotate();
return mCurrentAngle.copy();
}
/**
* Get the next float sample
*/
public float nextFloat()
public float getFloat()
{
rotate();
return mCurrentAngle.real();
}
public static void main( String[] args )
{
Oscillator o = new Oscillator( 1200, 2400 );
for( int x = 0; x < 20; x++ )
{
System.out.println( o.nextComplex().toString() );
}
}
}