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 @Override
public boolean canChangeTo( State state ) public boolean canChangeTo( State state )
{ {
return state == CALL || return state == FADE;
state == CONTROL ||
state == DATA ||
state == FADE;
} }
}, },
CONTROL( "CONTROL" ) CONTROL( "CONTROL" )

View File

@@ -820,12 +820,6 @@ public class P25ChannelState extends ChannelState
private void processLDU( LDUMessage ldu ) private void processLDU( LDUMessage ldu )
{ {
/* Send audio frames to the audio output */
if( mAudioOutput != null )
{
mAudioOutput.receive( ldu );
}
State state = getState(); State state = getState();
/* Only change the state for valid ldus */ /* Only change the state for valid ldus */
@@ -834,6 +828,12 @@ public class P25ChannelState extends ChannelState
state = ldu.isEncrypted() ? State.ENCRYPTED : State.CALL; 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 ) if( ldu instanceof LDU1Message )
{ {
switch( ((LDU1Message)ldu).getOpcode() ) switch( ((LDU1Message)ldu).getOpcode() )

View File

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