P25 - fix for encrypted calls to mute audio.

This commit is contained in:
dennis.sheirer
2015-04-26 23:45:01 +00:00
parent 2c4b3ab1b5
commit deddc11cc0
3 changed files with 8 additions and 12 deletions

View File

@@ -602,10 +602,7 @@ public abstract class ChannelState implements Listener<Message>
@Override
public boolean canChangeTo( State state )
{
return state == CALL ||
state == CONTROL ||
state == DATA ||
state == FADE;
return state == FADE;
}
},
CONTROL( "CONTROL" )

View File

@@ -820,12 +820,6 @@ public class P25ChannelState extends ChannelState
private void processLDU( LDUMessage ldu )
{
/* Send audio frames to the audio output */
if( mAudioOutput != null )
{
mAudioOutput.receive( ldu );
}
State state = getState();
/* Only change the state for valid ldus */
@@ -833,6 +827,12 @@ public class P25ChannelState extends ChannelState
{
state = ldu.isEncrypted() ? State.ENCRYPTED : State.CALL;
}
/* Send audio frames to the audio output */
if( mAudioOutput != null && state != State.ENCRYPTED )
{
mAudioOutput.receive( ldu );
}
if( ldu instanceof LDU1Message )
{

View File

@@ -47,8 +47,7 @@ public class P25MessageFramer implements Listener<Dibit>
/* Costas Loop phase lock error correction values. A phase lock error of
* 90 degrees requires a correction of 1/4 of the symbol rate (1200Hz). An
* error of 180 degrees requires a correction of 1/2 of the symbol rate
* (2400Hz) */
* error of 180 degrees requires a correction of 1/2 of the symbol rate */
public static final double SYMBOL_FREQUENCY = 2.0d * Math.PI * 4800.0d / 48000.0d;
public static final double PHASE_CORRECTION_90_DEGREES = SYMBOL_FREQUENCY / 4.0d;
public static final double PHASE_CORRECTION_180_DEGREES = SYMBOL_FREQUENCY / 2.0d;