From deddc11cc04dffe1ddbb905fadf138b02d7bbace Mon Sep 17 00:00:00 2001 From: "dennis.sheirer" Date: Sun, 26 Apr 2015 23:45:01 +0000 Subject: [PATCH] P25 - fix for encrypted calls to mute audio. --- src/controller/state/ChannelState.java | 5 +---- src/decode/p25/P25ChannelState.java | 12 ++++++------ src/decode/p25/P25MessageFramer.java | 3 +-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/controller/state/ChannelState.java b/src/controller/state/ChannelState.java index 12b7b90a..766693bc 100644 --- a/src/controller/state/ChannelState.java +++ b/src/controller/state/ChannelState.java @@ -602,10 +602,7 @@ public abstract class ChannelState implements Listener @Override public boolean canChangeTo( State state ) { - return state == CALL || - state == CONTROL || - state == DATA || - state == FADE; + return state == FADE; } }, CONTROL( "CONTROL" ) diff --git a/src/decode/p25/P25ChannelState.java b/src/decode/p25/P25ChannelState.java index f7730ceb..dad5647c 100644 --- a/src/decode/p25/P25ChannelState.java +++ b/src/decode/p25/P25ChannelState.java @@ -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 ) { diff --git a/src/decode/p25/P25MessageFramer.java b/src/decode/p25/P25MessageFramer.java index 91b714e6..dc8aac08 100644 --- a/src/decode/p25/P25MessageFramer.java +++ b/src/decode/p25/P25MessageFramer.java @@ -47,8 +47,7 @@ public class P25MessageFramer implements Listener /* 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;